LINUX SYSYTEM LAB

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

1. Installation of operating system (Window 7 and LINUX).

1. Installing Windows 7
Requirements:
• A valid Windows 7 license key.
• Windows 7 installation media (DVD or USB drive).
• A computer or virtual machine to install on.
Steps for Installation:
Step 1: Prepare Installation Media
• Download Windows 7 ISO from Microsoft's official website, if you don't
already have it.
• Use a tool like Rufus to create a bootable USB drive (if you're using
USB).
1. Insert a USB drive (at least 4GB of space).
2. Open Rufus, select the Windows 7 ISO and the USB drive.
3. Choose the partition scheme (MBR for BIOS or GPT for UEFI).
4. Click "Start" to create a bootable USB.
Step 2: Boot from USB/DVD
• Restart your PC and enter the BIOS or UEFI settings (usually by
pressing F2, DEL, or another key depending on your motherboard).
• Change the boot order so that the system boots from the USB or DVD
drive first.
• Save changes and exit the BIOS/UEFI.
Step 3: Start Windows 7 Installation
• After booting from the installation media, you'll see the Windows 7
setup screen.
• Select your language preferences and click Next.
• Click Install Now.
• Enter your product key when prompted (you can skip this step and enter
it later if necessary).
• Accept the license terms and click Next.
Step 4: Select Installation Type
• Choose Custom (Advanced) for a fresh installation.
• Select the partition where you want to install Windows 7.
• If the disk is empty, you can create new partitions here.
• If you want to overwrite a previous Windows installation, delete
the existing partition and create a new one.
Step 5: Installation Process
• Windows will copy files, expand them, and install updates. The system
will automatically restart multiple times.
• Set up your region, language, and time zone, and create a user account
when prompted.
• Enter the Windows 7 license key if not done earlier.
• Complete any additional settings such as configuring a network and
selecting security settings.
Step 6: Install Drivers
• After the installation, Windows will automatically try to install
necessary drivers. However, it is a good idea to manually install
drivers for your hardware, especially for graphics cards, network
adapters, and printers. These can usually be found on the
manufacturer's website.
Step 7: Update Windows
• Once installed, go to Control Panel > Windows Update to check for any
updates and install them.
2. Installing Linux (Ubuntu as an example)
Requirements:
• A valid Linux distribution ISO (e.g., Ubuntu).
• A USB drive (at least 4GB).
• A computer to install Linux on.
Steps for Installation:
Step 1: Download Linux Distribution
• Visit the official website of the Linux distribution you want to
install (e.g., Ubuntu).
• Download the appropriate version of the ISO file.
Step 2: Create Bootable USB
• Use a tool like Rufus (for Windows) or Etcher (for Linux and macOS) to
create a bootable USB.
1. Insert a USB drive (at least 4GB).
2. Open Rufus (or Etcher) and select the Linux ISO file.
3. Choose the USB drive and click Start to create the bootable
media.
Step 3: Boot from USB
• Restart your computer and enter the BIOS/UEFI settings (usually by
pressing F2, DEL, or ESC).
• Change the boot order so that the system boots from the USB drive
first.
• Save and exit BIOS/UEFI.
Step 4: Start Installation
• After booting from the USB, you'll see the Linux installation screen.
• Select Install Ubuntu (or your chosen distro).
• Select your language and region.
Step 5: Disk Partitioning
• The installer will ask how you want to install Linux:
• Install alongside Windows: This is the best option if you want
to set up a dual-boot system.
• Erase disk and install Ubuntu: This option will delete all data
on the disk and install Linux as the sole OS.
• Manual partitioning: This is for advanced users who want to
manually set up partitions.
Step 6: Set Up User Information
• Choose your time zone, keyboard layout, and create a user account
(username, password, and computer name).
• Configure your system settings (such as encryption, if desired).
Step 7: Complete the Installation
• The installer will copy files and install the system.
• Once the installation is complete, you'll be prompted to restart the
computer. Remove the USB drive before rebooting.
Step 8: Post-Installation
• After restarting, you will boot into your new Linux system. Check for
any system updates by running:
• sql
sudo apt update
sudo apt upgrade

• If you're doing a dual-boot setup, the GRUB bootloader will allow you
to choose between Windows 7 and Linux when starting the computer.
Step 9: Install Drivers
• Linux usually installs the most essential drivers automatically, but
you may need to install proprietary drivers (such as graphics or Wi-
Fi) manually:
• Use the Software & Updates tool to install additional drivers.

2. Installation of office productivity software (MS Office/ Open


Office).
1. Installing Microsoft Office (MS Office)
On Windows:
Step 1: Obtain the Installation Media
• Microsoft Office 365 / Office 2021 / Office 2019 can be downloaded
from the official Microsoft website or from a retail copy (either
physical media or a download link).
• Office 365: Subscription-based, includes cloud storage and
ongoing updates.
• Office 2019/2021: One-time purchase for the software suite.
Step 2: Sign In (For Office 365)
• For Office 365, sign in with your Microsoft account.
• If you don’t have an account, you can create one during the
installation process.
Step 3: Download and Install
• Office 365 / Office 2021 / 2019:
1. Go to the Office Setup page and enter your product key (if
applicable).
2. Click Install Office and download the installer.
3. Once downloaded, run the installer and follow the prompts.
4. The installation will take a few minutes depending on your
internet speed.
Step 4: Activate Office
• After installation, open any Office application (Word, Excel, etc.).
• If prompted, sign in with your Microsoft account (for Office 365) or
enter your product key (for Office 2019/2021).
Step 5: Updates
• Once installed, make sure your Office suite is up-to-date. Open any
Office application, go to File > Account > Update Options > Update
Now.

On macOS:
Step 1: Get Microsoft Office
• You can download the installer from the Microsoft Office website, or
through the Mac App Store.
Step 2: Install Office
1. After downloading, open the installer file (.pkg).
2. Follow the prompts to install Office.
3. Once the installation is complete, you can access the applications
from your Applications folder.
Step 3: Sign In
• Sign in with your Microsoft account to activate Office 365, or enter
your product key for Office 2021/2019.
Step 4: Updates
• Open any Office application, go to the Help menu, and select Check for
Updates to ensure your software is up-to-date.

2. Installing OpenOffice (Free & Open Source)


On Windows:
Step 1: Download OpenOffice
• Go to the official Apache OpenOffice website.
• Select the version for Windows (usually the default version is fine).
Step 2: Run the Installer
1. Once the OpenOffice installer is downloaded, run the .exe file.
2. Follow the prompts on the installation wizard.
• You can choose to install the default settings or customize the
installation (e.g., choosing which components like Writer, Calc,
Impress, etc., to install).
Step 3: Launch OpenOffice
• After installation, you can find OpenOffice in the Start Menu (or
Desktop, if you created a shortcut).
• Open any application from the suite (e.g., Writer for word
processing, Calc for spreadsheets).
Step 4: Set Up OpenOffice (Optional)
• You can set your default language, preferred file formats, and other
preferences from the Tools > Options menu.

3.User Management.
1. User Management in Windows

In Windows, user management allows administrators to create, modify, and


delete user accounts, set passwords, and assign different roles
(administrator, standard user, guest, etc.). User management in Windows is
typically done via Control Panel or Settings for a GUI approach, or
via Command Prompt or PowerShell for more advanced operations.

A. Managing Users via the GUI (Control Panel/Settings)

Step 1: Open User Accounts

• For Windows 10/11:

1. Open Settings by pressing Win + I.

2. Navigate to Accounts.

3. Under Your Info, you can see your account type and other
details.

• For Windows 7:

1. Open the Control Panel.

2. Click on User Accounts.

3. From here, you can manage accounts by clicking on Manage another


account.

Step 2: Create a New User


• Windows 10/11:

1. Go to Settings > Accounts > Family & other users.

2. Under Other users, click on Add someone else to this PC.

3. Choose whether you want to add a Microsoft account (online) or


a local account (offline).

4. Follow the on-screen prompts to create the user.

• Windows 7:

1. In the Control Panel > User Accounts, select Manage another


account.

2. Click Create a new account, then enter the name and choose an
account type (Standard or Administrator).

Step 3: Modify User Account

• To change the account type (Admin or Standard) or reset password:

1. Go to Control Panel > User Accounts > Manage another


account (or Settings > Accounts).

2. Select the account you wish to modify.

3. Choose Change account type or Change the password.

Step 4: Delete a User Account

• Go to Control Panel > User Accounts > Manage another account.

• Select the user account you want to delete and click Delete the
account. You will be given the option to delete the account or keep
its files.

B. Managing Users via Command Prompt/PowerShell

Create a New User (Command Prompt)

• Replace username and password with the actual user name and password.

Add User to Administrators Group

Delete a User

2. User Management in Linux


In Linux, user management is done primarily through the command
line (Terminal), although GUI tools are available in some distributions
(e.g., Ubuntu's Users and Groups).

A. Creating and Managing Users via Command Line

Step 1: Creating a New User

To create a new user, use the useradd command:

• The -m option ensures a home directory is created for the user.

To set a password for the new user:

• You will be prompted to enter the new password.

Step 2: Assigning User to Groups

In Linux, users can be assigned to specific groups, which allows you to


manage permissions efficiently.

To add the user to a group (e.g., sudo to grant administrative privileges):

• The -aG option ensures the user is added to the group without removing
them from other groups.

Example (add username to the sudo group):

Set Password for New User

• Use the passwd command to set a password for the new user

This prompts you to enter and confirm the password for alice.

Step 3: Modifying Existing Users

Modifying User Information with usermod


• Change Username (-l): Change the login name of a user.
Change Home Directory (-d): Move or set a new home directory for the
user.

sudo usermod -d /new_home/alice -m alice

Add or Change User Group (-g or -G): Add the user to new groups.

sudo usermod -aG sudo alice


• -aG adds alice to a new secondary group without removing existing
groups

Step 4: Deleting Users

Delete a User with userdel


• Basic Deletion:

This removes the user but leaves their home directory and files intact.
• Delete User and Home Directory (-r): Removes the user along with their
home directory and all

4. Security Management .

Security management in a computing environment involves safeguarding systems,


data, and networks through various protective measures. It includes setting
policies, managing user access, monitoring activities, and securing
infrastructure. Here’s an overview of essential components in security
management, particularly relevant to system administrators and IT security
professionals:

1. Access Control and Authentication

• Authentication: Verifying users' identities through passwords,


biometrics, or multi-factor authentication (MFA). Ensures that only
authorized users access the system.

• Access Control: Implementing Role-Based Access Control (RBAC) or


Attribute-Based Access Control (ABAC) to limit user access based on
their roles or specific attributes.

• Principle of Least Privilege (PoLP): Granting users the minimum


permissions necessary to perform their tasks to reduce the potential
damage from security breaches.
2. Password Management

• Password Policies: Enforcing complex passwords, regular password


changes, and expiration policies to improve security.

• Credential Storage: Storing passwords securely using encryption (e.g.,


/etc/shadow file on Linux) and hashing algorithms like bcrypt or SHA-
256.

• Self-Service Password Reset: Implementing self-service options for


users to reset passwords securely without administrative intervention.

3. Network Security

• Firewalls: Configuring firewalls to monitor and control incoming and


outgoing network traffic based on predetermined security rules.

• Intrusion Detection and Prevention Systems (IDPS): Using IDPS tools to


monitor network traffic for suspicious activity and potential threats.

• VPN and Secure Access: Enforcing Virtual Private Network (VPN) usage
for secure remote access to corporate networks, ensuring data
encryption over public networks.

4. Data Protection and Encryption

• Data Encryption: Encrypting sensitive data in transit and at rest,


using protocols like SSL/TLS for web data, and AES-256 for file
encryption.

• Backups and Recovery: Regularly backing up critical data and


maintaining a robust disaster recovery plan to prevent data loss.

• Data Loss Prevention (DLP): Implementing DLP policies and tools to


monitor, detect, and block sensitive data from being shared or
accessed improperly.

5. Audit and Monitoring

• Log Management: Collecting and analyzing system and network logs to


track user activities, application errors, and security events.

• Regular Audits: Conducting routine audits to review access rights,


permissions, and security configurations for compliance with security
policies.

• Threat Detection: Using security information and event management


(SIEM) systems to detect unusual patterns, unauthorized access, or
malware attacks in real-time.

6. Patch Management and Software Updates

• Regular Updates: Ensuring operating systems, applications, and


security software are up-to-date with the latest patches to protect
against vulnerabilities.

• Automated Patch Deployment: Using automated tools to deploy patches


across all systems promptly, especially for critical vulnerabilities.
• Vulnerability Scanning: Running regular scans to identify unpatched
vulnerabilities and other security weaknesses in software and
configurations.

7. Incident Response and Recovery

• Incident Response Plan: Developing a step-by-step incident response


plan to handle security breaches effectively, including roles,
responsibilities, and communication channels.

• Backup and Restore: Ensuring data backups are securely stored and
regularly tested to guarantee quick recovery after an incident.

• Post-Incident Review: Conducting reviews after incidents to identify


root causes, improve security controls, and prevent similar events in
the future.

8. Security Policies and Awareness

• Security Policies: Establishing clear policies for acceptable use,


data protection, remote access, and incident response.

• User Training: Educating employees on best practices, such as


recognizing phishing attempts, creating strong passwords, and handling
sensitive information securely.

• Regular Security Drills: Running mock security drills to test the


effectiveness of security protocols and prepare users for potential
security incidents.

5. Startup & Shutdown scripts.


Startup and shutdown scripts are essential for managing tasks that need to be
executed automatically when a system starts up or shuts down. These scripts
are often used to start or stop services, configure system settings, and
ensure the system initializes properly.

1. Startup Scripts

Purpose: Startup scripts run when the system boots. They automate tasks like
starting essential services, mounting filesystems, and setting environment
variables.

Configuration Locations (varies by operating system):

• Linux:

o Systemd (/etc/systemd/system/): Modern Linux systems use systemd


to manage services at startup. You can create custom service
files to control when scripts are run.

o Init Scripts (/etc/init.d/): Older systems use SysVinit or


Upstart and typically have startup scripts in /etc/init.d/.

o User-specific Startup Scripts: Add commands to .bashrc or


.bash_profile in the user’s home directory to run scripts when a
user logs in.

• Windows:
o Task Scheduler: Use Task Scheduler to set up tasks that run on
startup.

o Startup Folder: Add scripts or application shortcuts to


C:\Users\<Username>\AppData\Roaming\Microsoft\Windows\Start
Menu\Programs\Startup.

Creating a Startup Script in Linux (Systemd)

1. Create the Script: Create a script in /usr/local/bin/ (or a similar


location) and make it executable.

2.Create a Systemd Service File:

3.Enable and Start the Service:

2. Shutdown Scripts
Purpose: Shutdown scripts are used to cleanly stop services, back up
data, or unmount drives before the system powers down or reboots.

Configuration Locations:

• Linux:

o Systemd: Custom service files can be created to trigger scripts


at shutdown.

o SysVinit: Shutdown scripts are located in /etc/rc0.d/ (for halt)


or /etc/rc6.d/ (for reboot).

• Windows:

o Task Scheduler: Configure a task that triggers on the "System


shutdown" event.

o Group Policy (Windows Pro/Enterprise): Use Local Group Policy


Editor (gpedit.msc) under Computer Configuration > Windows
Settings > Scripts (Startup/Shutdown) to run shutdown scripts.

Creating a Shutdown Script in Linux (Systemd)

1. Create the Script: As with the startup script, create a shutdown


script in /usr/local/bin/.
2.Create a Systemd Service File:

3.Enable the Shutdown Service:

6. Network planning - subnet creation.

Network Planning and Subnet Creation is an essential part of designing a


network. Proper subnetting helps in optimizing network resources, improving
security, and ensuring scalability. It involves dividing a large network into
smaller, manageable sub-networks (subnets) based on the requirements of the
network.

Here’s a step-by-step guide on how to plan and create subnets.

1. Understanding Subnets and Subnet Masks

• IP Address: Every device on a network has a unique IP address. An IP


address consists of 4 octets (IPv4), and each octet contains 8 bits
(total of 32 bits).

• Subnet Mask: A subnet mask is used to define the network portion and
the host portion of an IP address. It uses a series of 1s to define
the network part and 0s for the host part. The subnet mask is often
written in the same form as the IP address (e.g., 255.255.255.0).

2. Key Concepts in Subnetting

• Class A, B, and C IP Addresses:

o Class A: 1.0.0.0 to 127.255.255.255 (default subnet mask:


255.0.0.0)

o Class B: 128.0.0.0 to 191.255.255.255 (default subnet mask:


255.255.0.0)

o Class C: 192.0.0.0 to 223.255.255.255 (default subnet mask:


255.255.255.0)

• CIDR Notation: Subnet masks can also be written in CIDR (Classless


Inter-Domain Routing) notation as /n, where n is the number of 1s in
the subnet mask (e.g., 192.168.1.0/24).
3. Steps to Plan Subnet Creation

Here’s a simple, structured way to create subnets:

Step 1: Identify the IP Range

• Private IP Ranges:

o Class A: 10.0.0.0 - 10.255.255.255

o Class B: 172.16.0.0 - 172.31.255.255

o Class C: 192.168.0.0 - 192.168.255.255

• Choose an IP range that fits the needs of your network. For example,
if you have a large organization, Class A might be appropriate.

Step 2: Determine Subnet Requirements

• How many subnets do you need? Consider dividing the network into
smaller subnets for different departments, buildings, or geographical
locations.

• How many hosts per subnet? Each subnet will need enough IP addresses
for all devices (e.g., computers, printers, servers).

Step 3: Choose the Subnet Mask

• The subnet mask depends on how many subnets and how many IP addresses
per subnet are required.

• You can calculate the number of bits needed for subnetting based on
the desired number of subnets. Use the formula:

Number of subnets=2n\text{Number of subnets} = 2^nNumber of subnets=2n

where n is the number of bits borrowed for subnetting.

• Example:

o If you need 4 subnets, you need to borrow 2 bits (since 2^2 =


4).

o If you need 100 subnets, you need to borrow 7 bits (since 2^7 =
128).

o For each subnet, consider how many host IP addresses are needed
(e.g., 50 devices per subnet).

Step 4: Perform the Subnet Calculation

• Use the formula for determining the number of hosts per subnet:
Number of hosts=2h−2\text{Number of hosts} = 2^h -
2Number of hosts=2h−2 where h is the number of host bits (the
remaining bits after borrowing for subnetting).

o The -2 accounts for the network address (all 0s) and the
broadcast address (all 1s) in each subnet.

• Example:
o If the subnet mask is 255.255.255.0 (/24), there are 8 bits for
the host portion. This gives 2^8 - 2 = 254 usable IP addresses
per subnet.

Step 5: Calculate Subnet Addresses

• Example: You have a 192.168.1.0/24 network and want to create 4


subnets.

• Borrow 2 bits from the host portion, changing the subnet mask to /26.
This gives you 4 subnets, each with 62 usable IP addresses.

• The subnets would be:

o 192.168.1.0/26 (Network: 192.168.1.0, Broadcast: 192.168.1.63)

o 192.168.1.64/26 (Network: 192.168.1.64, Broadcast:


192.168.1.127)

o 192.168.1.128/26 (Network: 192.168.1.128, Broadcast:


192.168.1.191)

o 192.168.1.192/26 (Network: 192.168.1.192, Broadcast:


192.168.1.255)

Step 6: Assign Subnet IP Addresses

• Assign the first usable IP address from each subnet to the router or
gateway (e.g., 192.168.1.1, 192.168.1.65, etc.).

• Then assign the remaining IP addresses to devices (computers,


printers, etc.).

4. Example Scenario: Subnetting a Network

Let's say you have the following requirements:

• IP Range: 192.168.1.0/24

• Number of Subnets Needed: 4

• Devices per Subnet: 50

Steps to Create Subnets:

1. Determine the Subnet Mask:

o You need 4 subnets. Borrow 2 bits to create 4 subnets (2^2 = 4).

o The new subnet mask becomes /26, or 255.255.255.192.

2. Calculate Number of Hosts:

o With a /26 subnet, there are 6 bits for the host portion (2^6 -
2 = 62 usable IP addresses per subnet).

3. Subnet Addresses:

o Subnet 1: 192.168.1.0/26 (usable IPs: 192.168.1.1 to


192.168.1.62)

o Subnet 2: 192.168.1.64/26 (usable IPs: 192.168.1.65 to


192.168.1.126)
o Subnet 3: 192.168.1.128/26 (usable IPs: 192.168.1.129 to
192.168.1.190)

o Subnet 4: 192.168.1.192/26 (usable IPs: 192.168.1.193 to


192.168.1.254)

5. Tools for Subnetting

• Subnet Calculators: There are many online subnet calculators that make
the math easier. These tools help you determine subnet sizes,
addresses, and ranges.

• CIDR to Subnet Mask Conversion: Websites or command-line tools like


ipcalc can be used to convert between CIDR notation and subnet masks.

7. Firewall configuration.

Firewall configuration is a critical part of network security. A firewall


acts as a barrier between trusted internal networks and untrusted external
networks, controlling incoming and outgoing traffic based on predefined
security rules. Below is a guide for configuring a firewall, including
general principles and examples for both Linux (using iptables or firewalld)
and Windows.

1. Overview of Firewall Concepts

• Packet Filtering: The firewall inspects each packet of data passing


through and decides whether to allow or block it based on defined
rules.

• Stateful Inspection: A more advanced firewall feature that monitors


the state of active connections and allows or blocks traffic based on
the context (state) of the connection.

• NAT (Network Address Translation): A process where the firewall


modifies the source or destination IP address in packets to route them
to the correct address.

• Zones: Defined security levels used in more advanced firewalls (e.g.,


firewalld), where different zones correspond to different trust
levels.

2. Firewall Types

• Network Firewalls: These protect an entire network, sitting between a


private network and the internet.

• Host-based Firewalls: These firewalls protect individual devices, such


as a server or workstation.

3. Configuring Firewalls in Linux

Using iptables
iptables is the traditional Linux firewall tool used to manage network
traffic. It allows detailed control over network packets and can implement
filtering, NAT, and more.

Basic iptables Commands

1. Viewing Current Rules:

2.Allowing Traffic on Port 80 (HTTP): To allow incoming HTTP traffic:

3.Blocking Traffic on Port 22 (SSH): To block SSH access:

4.Allowing All Outbound Traffic: To allow all outgoing traffic:

5.Saving iptables Rules: On most distributions, the rules are not persistent
by default, so you need to save them:

• On Debian/Ubuntu:

Using firewalld

firewalld is a more modern firewall management tool that provides a


dynamic interface for managing firewall rules, making it easier to work
with than iptables for many users.

Basic firewalld Commands

1. Start/Stop the firewalld Service:

2.Check the Active Zones:

3.Allow Traffic on HTTP Port (80):


4.Allow SSH (Port 22):

5.Block All Incoming Traffic:

6.Add a Custom Service (e.g., MyCustomApp): To create a custom service,


you first define the ports and protocols and then add it to the firewall
rules:

4. Configuring Firewalls in Windows

In Windows, you manage the built-in Windows Defender Firewall to control


network traffic.

Using Windows Firewall via GUI

1. Open Windows Firewall Settings:

o Open the Control Panel and search for "Firewall".

o Click on Windows Defender Firewall.

2. Allow an App or Feature Through the Firewall:

o Click Allow an app or feature through Windows Defender Firewall.

o Choose the app you want to allow, or click Allow another app to
add a new one.

3. Create Inbound/Outbound Rules:

o In the left sidebar, click Advanced Settings to open the Windows


Firewall with Advanced Security.

o In the Inbound Rules or Outbound Rules sections, right-click and


choose New Rule.

o You can create a rule based on Port, Program, or Predefined


service types.
8. Basic properties of Windows Registry.

The Windows Registry is a hierarchical database used by the Microsoft


Windows operating system to store configuration settings and options. It
contains information, settings, and options for both the operating system
and installed applications, including hardware, system software, user
preferences, and application-specific settings.

Here’s a detailed breakdown of the basic properties of the Windows


Registry:

1. Structure of the Windows Registry

The registry is organized into a tree-like structure consisting of keys


and values.

• Keys: The main categories or folders that store configuration


settings. Each key can have multiple subkeys.

• Values: The actual settings within a key. Each value has a name and is
associated with a specific data type.

The Main Registry Hives

The Windows Registry is divided into several main sections known as


hives, each containing specific data related to system configuration.

1. HKEY_CLASSES_ROOT (HKCR):

o Stores information about file associations and OLE (Object


Linking and Embedding) object registrations.

o It tells Windows which program to use to open a specific file


type (e.g., .txt, .exe).

2. HKEY_CURRENT_USER (HKCU):

o Contains settings specific to the currently logged-in user,


including user preferences and environment settings.

o This hive is where user-specific settings, such as desktop


settings and application preferences, are stored.

3. HKEY_LOCAL_MACHINE (HKLM):

o Stores settings that are used by the operating system and


applications for all users on the computer.

o Includes hardware configurations, software installations, and


operating system settings.

4. HKEY_USERS (HKU):

o Contains information for all users on the system, including the


settings from the HKEY_CURRENT_USER hive for each user profile.

o Each user on the system has a subkey under HKEY_USERS.

5. HKEY_CURRENT_CONFIG (HKCC):
o Contains information about the current hardware profile in use
(e.g., display resolution, sound settings).

o It’s used by Windows to determine hardware settings that apply


to the currently active profile.

2. Types of Registry Data Values

The data stored in the Windows Registry is represented by various data


types. Here are the most common data types found in the Registry:

1. String Values (REG_SZ):

o Used to store text data.

o Example: "C:\Program Files\MyApp"

2. Expandable String Values (REG_EXPAND_SZ):

o Similar to string values but support environment variables (like


%SystemRoot%).

o Example: "C:\Windows\%ProgramFiles%"

3. Binary Values (REG_BINARY):

o Stores raw binary data, often used for settings that are not
human-readable.

o Example: Device driver settings, firmware configurations.

4. DWORD (REG_DWORD):

o Stores 32-bit integer values (0 or 1, for example).

o Used for flags or numeric settings.

o Example: 0 or 1 for enabling/disabling certain features.

5. QWORD (REG_QWORD):

o Stores 64-bit integer values.

o Used for larger numeric settings.

6. Multi-String Values (REG_MULTI_SZ):

o Stores multiple strings as a list of strings, typically used for


lists of file names or components.

o Example: A list of file extensions associated with a program.

7. String List (REG_MULTI_SZ):

o Allows multiple strings to be stored in a single value.

o Often used to store lists, such as services, file types, or


paths.

8. None (REG_NONE):

o This data type has no associated data and is often used as a


placeholder.
3. Common Registry Paths

Some commonly used Registry paths include:

1. System Configuration:

o HKEY_LOCAL_MACHINE\System

o Stores low-level configuration settings like boot options and


hardware profiles.

2. Software Configuration:

o HKEY_LOCAL_MACHINE\Software

o Stores settings for installed applications.

3. User Preferences:

o HKEY_CURRENT_USER\Software

o Stores preferences for the current user (such as desktop


settings, environment variables, and application preferences).

4. Startup Items:

o HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

o Controls which programs are started automatically when Windows


boots.

4. Accessing and Modifying the Windows Registry

Registry Editor (Regedit)

You can use the Registry Editor (Regedit) to view and modify the
registry:

1. Opening Regedit:

o Press Win + R, type regedit, and hit Enter.

o Be cautious when modifying registry settings, as incorrect


changes can damage your system.

2. Navigating the Registry:

o The Registry Editor allows you to navigate through the registry


tree (hives, keys, subkeys, and values) in a graphical
interface.

3. Exporting and Importing Registry Settings:

o You can export a registry key to back it up or share it. Right-


click a key, select Export, and save it as a .reg file.

o You can import a .reg file by double-clicking it, which will


merge the settings into the registry.
5. Modifying the Registry via Command Line

The reg command-line tool allows you to modify the registry from the
command prompt. Common commands include:

Exporting a registry key:

Importing a registry key:

Adding a registry value:

Deleting a registry key or value:

6. Registry Security

• Permissions: Just like files and folders, registry keys have


permissions that control which users and groups can read, modify, or
delete them. These permissions can be modified in the Registry Editor.

• Backup and Restore: Always back up the registry before making


significant changes. You can export individual keys or the entire
registry for safekeeping.

7. Registry Uses in Windows

• System Settings: The registry stores critical information such as boot


settings, hardware configuration, and system services.

• Application Configuration: Many applications store configuration


settings in the registry, including user preferences and
customizations.

• Performance Optimization: The registry contains settings that control


system performance, such as caching and virtual memory.

• Security and User Preferences: User account settings, user rights, and
other security-related data are stored in the registry.

8. Risks and Considerations

• Corruption: The registry can become corrupted if incorrect changes are


made. It is advisable to create backups before making modifications.
• Malware: Malicious software may target the registry to persist or make
system changes. Be cautious when downloading or executing untrusted
software.

• Performance: Over time, the registry may grow large, and inefficient
settings may slow down system performance. Regular cleaning is
sometimes recommended.

9. Study of Important Windows Services.

Windows Services are background processes that support Windows and various
applications. They perform essential tasks such as managing hardware, running
scheduled tasks, providing network connectivity, and supporting various
applications. Unlike typical applications, services run without user
interaction and can start automatically when the system boots up.

Below is a study of some of the most important Windows Services, what they
do, and how they contribute to system functionality.

1. Windows Update Service (wuauserv)

• Description: Responsible for managing Windows Updates, including


downloading, installing, and scheduling updates for the operating
system.

• Importance: Keeps Windows secure and up-to-date with the latest


patches, improvements, and security features.

• Service Name: wuauserv

• Typical Startup Type: Automatic (Delayed Start) or Manual

• Configuration Command:

2. Background Intelligent Transfer Service (BITS)

• Description: Transfers files in the background using idle network


bandwidth. It’s commonly used by Windows Update and other applications
to download data without disrupting user activities.

• Importance: Ensures efficient network usage by downloading data during


idle times, improving overall performance.

• Service Name: BITS

• Typical Startup Type: Manual

• Configuration Command
3. Print Spooler (Spooler)

• Description: Manages the printing process by storing print jobs in a


queue and sending them to the printer one at a time.

• Importance: Essential for printing tasks; handles print job management


and print server tasks.

• Service Name: Spooler

• Typical Startup Type: Automatic

• Configuration Command:

4. Windows Defender Antivirus Service (WinDefend)

• Description: Provides real-time protection against malware, spyware,


and other potentially harmful software.

• Importance: Crucial for system security, it scans for, identifies, and


removes malicious software in real time.

• Service Name: WinDefend

• Typical Startup Type: Automatic

• Configuration Command:

5. DHCP Client (Dhcp)

• Description: Manages and configures Dynamic Host Configuration


Protocol (DHCP), allowing the computer to obtain an IP address
automatically from a DHCP server.

• Importance: Essential for network connectivity in DHCP environments;


without it, users must manually assign IP addresses.

• Service Name: Dhcp

• Typical Startup Type: Automatic

• Configuration Command:

6. Windows Event Log (eventlog)

• Description: Manages event logs, including application, security, and


system logs. It allows system administrators to monitor system events
and troubleshoot issues.

• Importance: Vital for logging system activities, errors, and security


events. Essential for diagnostics and auditing.
• Service Name: eventlog

• Typical Startup Type: Automatic

• Configuration Command:

7. Remote Desktop Services (TermService)

• Description: Enables the Remote Desktop feature, allowing users to


connect to the computer remotely.

• Importance: Essential for remote management and access. Frequently


used in enterprise environments.

• Service Name: TermService

• Typical Startup Type: Manual

• Configuration Command:

8. Windows Time (w32time)

• Description: Synchronizes the system clock with external time servers,


ensuring accurate timekeeping.

• Importance: Accurate time is crucial for system logs, certificates,


and network authentication.

• Service Name: w32time

• Typical Startup Type: Automatic

9. Network Location Awareness (NlaSvc)

• Description: Collects and stores network configuration and location


information, informing other services about network state changes.

• Importance: Supports features like firewall configuration and network-


dependent applications that need to understand network status.

• Service Name: NlaSvc

• Typical Startup Type: Automatic

10. Windows Audio (AudioSrv)

• Description: Manages audio devices and sound playback on the computer.

• Importance: Necessary for audio playback and recording.

• Service Name: AudioSrv

• Typical Startup Type: Automatic


11. Task Scheduler (Schedule)

• Description: Enables scheduled tasks to run automatically based on


time or events.

• Importance: Essential for running maintenance tasks, updates, and


application tasks in the background.

• Service Name: Schedule

• Typical Startup Type: Automatic

12. Server (LanmanServer)

• Description: Provides file and printer sharing services on the


network.

• Importance: Needed for sharing files and printers with other computers
on the network.

• Service Name: LanmanServer

• Typical Startup Type: Manual or Automatic

10.Study of Important LINUX Services.

1. Systemd

• Description: Systemd is the default system and service manager for


most Linux distributions. It manages system initialization, handles
service management, and controls processes.

• Key Features: Enables parallel service starts, better dependency


handling, and centralized logging via journald.

• Commands: systemctl start|stop|status <service>, journalctl -xe.

2. SSH (Secure Shell)

• Description: SSH is used for secure remote login and command


execution. It's essential for managing Linux systems remotely.

• Key Features: Provides encrypted connections, supports tunneling, and


enables file transfers via SCP and SFTP.

• Commands: ssh <user>@<host>, scp <source> <destination>, sshd (SSH


daemon for managing connections).

3. Apache HTTP Server

• Description: Apache is one of the most popular web servers used to


serve web content.

• Key Features: Supports virtual hosting, modularity, and is highly


customizable.

• Commands: apachectl start|stop|status, configuration files typically


located in /etc/httpd/ or /etc/apache2/.
4. Nginx

• Description: Nginx is a high-performance web server known for handling


static content and acting as a reverse proxy.

• Key Features: Low memory usage, load balancing, and caching support.

• Commands: nginx -s start|stop|reload, configuration typically in


/etc/nginx/.

5. MySQL/MariaDB

• Description: MySQL and MariaDB are relational database management


systems used to store and retrieve data.

• Key Features: High scalability, ACID compliance, and support for


various storage engines.

• Commands: mysql -u <user> -p, service mysql start|stop|status,


configuration in /etc/my.cnf or /etc/mysql/.

6. DNS (BIND - Berkeley Internet Name Domain)

• Description: BIND is a widely used DNS server for translating domain


names into IP addresses.

• Key Features: Supports zone files, caching, and DNSSEC for security.

• Commands: named start|stop|status, configuration files typically in


/etc/bind/.

7. SAMBA

• Description: SAMBA enables file and printer sharing between Linux and
Windows systems using the SMB/CIFS protocol.

• Key Features: Allows Linux systems to interact with Windows networks,


file sharing, and domain integration.

• Commands: smbd start|stop|status, configuration in


/etc/samba/smb.conf.

8. Docker

• Description: Docker is a containerization platform that enables the


creation and deployment of containers.

• Key Features: Supports lightweight, isolated environments, fast


deployment, and is highly portable.

• Commands: docker start|stop|ps|run, docker-compose for orchestrating


multi-container setups.

9. Cron

• Description: Cron is a job scheduler that allows for the automation of


tasks at specified intervals.

• Key Features: Automates repetitive tasks, including backups, cleanup,


and monitoring scripts.
• Commands: crontab -e to edit the user crontab, system crontab
typically located in /etc/crontab.

10. Firewall (Iptables/Firewalld)

• Description: Iptables and Firewalld manage network traffic rules to


secure the system.

• Key Features: Packet filtering, network address translation (NAT), and


zoning (in Firewalld).

• Commands: iptables <options>, firewall-cmd --add-port=<port>,


configuration in /etc/sysconfig/iptables.
Linux System administration lab

BCE-C762

Name = Suraj Saroj (CSE,VII SEM)

Registration no = 216301100

submitted to: Department:

Prof. Nishant Kumar CSE,FET,GKV

You might also like