0% found this document useful (0 votes)
13 views

Short Notes Chapter 1

Uploaded by

jeetudj167
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Short Notes Chapter 1

Uploaded by

jeetudj167
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Q .What are the key features of the Linux operating system? 3.

3. Manage files: Navigate the file system, create, delete, and manipulate files and 2. Group: The group associated with the file. This runs /path/to/script. at 3 PM once.
Linux is a powerful, open-source operating system known for its stability, security, and directories. 3. Others: All other users. RAID Implementation
flexibility. Key features include: 4. System administration: Perform administrative tasks like user management and To view permissions: Q.Describe the different RAID levels: RAID0, RAID1, RAID5, RAID6, and RAID10.
1. Multitasking: Linux can handle multiple tasks simultaneously. software installation. ls -l • RAID0: Striping. Data is split across multiple disks, improving performance but offering
2. Multiuser capability: Multiple users can access system resources like memory and 5. Command history: Access previously executed commands. To change permissions, use the chmod command: no redundancy.
programs without interfering with each other. Advanced User Management chmod u+rwx,g+rx,o-r filename • RAID1: Mirroring. Data is duplicated across two disks, providing redundancy.
3. Portability: Linux runs on various hardware platforms. Q.How do you create, delete, and modify user accounts in Linux? To change the owner, use the chown command: • RAID5: Striping with parity. Data and parity are striped across three or more disks,
4. Security: It offers robust security features, including user permissions, firewalls, and 1.Create a user: Use the useradd command. chown owner:group filename offering a balance of performance and redundancy.
encryption. sudo useradd username To change the group, use the chgrp command: • RAID6: Striping with double parity. Similar to RAID5 but with an extra parity block,
5. Open-source: Its source code is freely available for anyone to view, modify, and Optionally, create a home directory and set a password: chgrp groupname filename allowing for two disk failures.
distribute. sudo useradd -m username sudo passwd username Permissions & Task Scheduling • RAID10: Combining RAID1 and RAID0. Data is mirrored and striped, offering high
6. Support for networking: Strong support for networking functionalities, including 2.Delete a user: Use the userdel command. Q.How do file and directory permissions work in Linux? Explain chmod, chown, and performance and redundancy.
routing and network services. sudo userdel username chgrp. What are the advantages and disadvantages of each RAID level?
7. Variety of distributions: Many distributions (distros) cater to different needs, like To remove the user's home directory and mail spool: Permissions determine how users can interact with files and directories: • RAID0:
Ubuntu, Fedora, and CentOS. ,sudo userdel -r username • Read (r): Allows viewing the file's content or listing the directory's contents. • Advantages: Improved performance, full disk capacity utilization.
Explain the Linux directory structure. 3.Modify a user: Use the usermod command. • Write (w): Allows modifying the file's content or creating/deleting files in the directory. • Disadvantages: No redundancy, high risk of data loss if a disk fails.
The Linux directory structure is hierarchical, with the root directory ("/") at the top. Key ,sudo usermod -l newusername oldusername • Execute (x): Allows running the file as a program or entering the directory. • RAID1:
directories include: To change the home directory: The chmod command changes file permissions: • Advantages: High redundancy, easy recovery from disk failure.
1. /bin: Essential binary executables. ,sudo usermod -d /new/home/dir username chmod u+rwx,g+rx,o-r file • Disadvantages: Only 50% of disk capacity used for storage.
2. /boot: Boot loader files. Q.Explain the purpose and usage of groups in Linux. The chown command changes the owner and group: • RAID5:
3. /dev: Device files. Groups in Linux are used to organize users and manage permissions collectively. By chown owner:group file • Advantages: Good balance of performance, redundancy, and storage efficiency.
4. /etc: Configuration files. assigning users to groups, administrators can: The chgrp command changes the group ownerip: • Disadvantages: Slower write performance due to parity calculation, requires at least
5. /home: User home directories. 1.Control access: Set permissions for files and directories based on group ownerip. chgrp group file three disks.
6. /lib: ared libraries. 2.Simplify administration: Easier to manage permissions for a set of users rather than Q.What is a cron job and how do you schedule tasks using crontab? • RAID6:
7. /media: Mount points for removable media. individually. A cron job is a scheduled task that runs at specified intervals using the cron daemon. To • Advantages: High redundancy, can tolerate two disk failures.
8. /mnt: Temporary mount point. 3.Collaborate: Facilitate collaborative work by aring resources among group members. schedule tasks, use the crontab command: • Disadvantages: Slower write performance, more complex setup, requires at least four
9. /opt: Optional software packages. To create a group: crontab -e disks.
10. /root: Root user's home directory. ,sudo groupadd groupname This opens the user's crontab file, where you can add jobs in the following format: • RAID10:
11. /sbin: System administration binaries. To add a user to a group: sql • Advantages: Excellent performance and redundancy.
12. /tmp: Temporary files. sudo usermod -aG groupname username minute hour day month day_of_week command • Disadvantages: Expensive, only 50% of disk capacity used for storage.
13. /usr: User binaries and read-only data. Q.Describe how to manage user and group permissions. Example: Q. How do you set up and configure software RAID on a Linux system?
14. /var: Variable data files, like logs and databases. Permissions in Linux determine the access level of users and groups to files and 0 2 * * * /path/to/script. 1. Install mdadm: The tool used to manage software RAID.
Q. Describe the function and use of the ba ell in Linux. directories. There are three types of permissions: This runs /path/to/script. at 2 AM every day. sudo apt-get install mdadm
The Ba (Bourne Again ell) is the default command-line interpreter for many Linux 1. Read (r): View the contents. Explain the use of the at command for task scheduling. 2. Create RAID array: Use mdadm to create the desired RAID level.
distributions. It allows users to: 2. Write (w): Modify or delete the contents. The at command schedules a one-time task to run at a specified time. To schedule a task: sudo mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda /dev/sdb /dev/sdc
1. Execute commands: Interact with the system by typing commands. 3. Execute (x): Run the file as a program. echo "command" | at time 3. Create a filesystem:
2. Script automation: Write ell scripts to automate repetitive tasks. Permissions are set for three categories: Example: sudo mkfs.ext4 /dev/md0
1. Owner: The user who owns the file. ,echo " /path/to/script." | at 3pm 4. Mount the RAID array:

sudo mount /dev/md0 /mnt Remount the logical volume: Edit the configuration file /etc/dhcp/dhcpd.conf to define the subnet and options: local_umask=022
5. Save RAID configuration: sudo mount /dev/my_vg/my_lv /mnt subnet 192.168.1.0 netmask 255.255.255.0 { chroot_local_user=YES
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf Software Management using RPM and YUM range 192.168.1.100 192.168.1.200; Restart vsftpd service:
6. Update initramfs: How do you install, update, and remove packages using RPM? option routers 192.168.1.1; sudo systemctl restart vsftpd
sudo update-initramfs -u Install a package: option domain-name-servers 8.8.8.8, 8.8.4.4; Ensure the service starts on boot:
What is LVM and what are its benefits? sudo rpm -ivh package.rpm option domain-name "example.com"; sudo systemctl enable vsftpd
LVM (Logical Volume Management) is a method of allocating space on mass-storage Update a package: } What is NFS and how do you set up an NFS server?
devices that offers greater flexibility than traditional partitioning. Benefits include: sudo rpm -Uvh package.rpm Start and enable the DHCP service: NFS (Network File System) allows aring of files and directories over a network.
Dynamic resizing: Easily extend or reduce logical volumes. Remove a package: sudo systemctl start isc-dhcp-server Install NFS server:
Snapots: Create snapots for backups or testing. sudo rpm -e package_name sudo systemctl enable isc-dhcp-server sudo apt-get install nfs-kernel-server
Flexibility: Combine multiple physical disks into a single logical volume. What are the advantages of using YUM over RPM? Describe the setup and configuration of an Apache Web Server. Configure exports:
Better space management: Allocate space as needed, avoiding waste. Dependency resolution: YUM automatically handles dependencies, unlike RPM which Install Apache: Edit /etc/exports to define the ared directories.
Explain the steps to create and manage logical volumes in Linux. requires manual dependency resolution. sudo apt-get install apache2 Example:
Install LVM tools: Repositories: YUM works with repositories to download and install packages, making it Start and enable Apache: /srv/nfs 192.168.1.0/24(rw,sync,no_subtree_check)
sudo apt-get install lvm2 easier to manage software updates. sudo systemctl start apache2 Export the ares:
Create physical volumes: Ease of use: YUM provides simpler commands for managing packages compared to RPM. sudo systemctl enable apache2 sudo exportfs -a
sudo pvcreate /dev/sda1 /dev/sdb1 Describe the process of configuring and using YUM repositories. Configure Apache: Start and enable NFS service:
Create a volume group: Create a repository file: Edit configuration files in /etc/apache2/sites-available/ or create new virtual host sudo systemctl start nfs-kernel-server
sudo vgcreate my_vg /dev/sda1 /dev/sdb1 sudo vi /etc/yum.repos.d/myrepo.repo configurations. sudo systemctl enable nfs-kernel-server
Create a logical volume: Add repository configuration: Example virtual host configuration in /etc/apache2/sites-available/000-default.conf: Client-side mount:
sudo lvcreate -n my_lv -L 50G my_vg makefile <VirtualHost *:80> sudo mount -t nfs server:/srv/nfs /mnt
Create a filesystem on the logical volume: [myrepo] ServerAdmin webmaster@localhost Explain the process of configuring a DNS server in Linux.
sudo mkfs.ext4 /dev/my_vg/my_lv name=My Repository DocumentRoot /var/www/html Install BIND:
Mount the logical volume: baseurl=http://myrepo.example.com/repo/ ErrorLog ${APACHE_LOG_DIR}/error.log sudo apt-get install bind9
sudo mount /dev/my_vg/my_lv /mnt enabled=1 CustomLog ${APACHE_LOG_DIR}/access.log combined Configure BIND:
How do you extend or reduce a logical volume? gpgcheck=1 </VirtualHost> Edit /etc/bind/named.conf.local to add zones.
Extend a logical volume: gpgkey=http://myrepo.example.com/repo/RPM-GPG-KEY-myrepo Enable site configurations and modules if needed: Example:
Extend the logical volume: Install packages using YUM: sudo a2ensite 000-default.conf
sudo lvextend -L +20G /dev/my_vg/my_lv sudo yum install package_name sudo systemctl reload apache2 zone "example.com" {
Resize the filesystem: Update packages: How do you configure an FTP server in Linux? type master;
sudo resize2fs /dev/my_vg/my_lv sudo yum update sudo apt-get install vsftpd file "/etc/bind/db.example.com";
Reduce a logical volume: Remove packages: Configure vsftpd: };
Unmount the logical volume: sudo yum remove package_name Edit /etc/vsftpd.conf to customize settings. Create the zone file:
sudo umount /mnt Linux Networking Example configuration: Example zone file /etc/bind/db.example.com:
Reduce the filesystem size: How do you configure a DHCP server in Linux? listen=YES $TTL 604800
sudo resize2fs /dev/my_vg/my_lv 30G Install the DHCP server package: anonymous_enable=NO @ IN SOA ns1.example.com. admin.example.com. (
Reduce the logical volume: sudo apt-get install isc-dhcp-server local_enable=YES 2021051501 ; Serial
sudo lvreduce -L 30G /dev/my_vg/my_lv Configure the DHCP server: write_enable=YES 604800 ; Refre

86400 ; Retry Ubuntu typically uses ext4 or btrfs. auto eth0 Use: Provides unencrypted remote access to another machine.
2419200 ; Expire CentOS typically uses ext4 or xfs. iface eth0 inet static Command:
604800 ) ; Negative Cache TTL Release Cycle: address 192.168.1.100 telnet hostname
; Ubuntu has regular LTS (Long-Term Support) releases every two years and regular netmask 255.255.255.0 Security: Insecure, not recommended for use due to lack of encryption.
@ IN NS ns1.example.com. releases every six months. gateway 192.168.1.1 s (Secure ell):
ns1 IN A 192.168.1.10 CentOS has a longer release cycle, aligning with RHEL's enterprise-grade stability and dns-nameservers 8.8.8.8 8.8.4.4 Use: Provides encrypted remote access to another machine.
www IN A 192.168.1.11 support duration. Restart networking service: Command:
Restart BIND service: Community and Support: sudo systemctl restart networking s user@hostname
sudo systemctl restart bind9 Ubuntu has a larger community and more extensive online resources for beginners. Add a DNS server: Security: Secure, widely used for remote administration.
Ensure the service starts on boot: CentOS is favored in enterprise environments due to its RHEL compatibility and stability. Edit /etc/resolv.conf to add: putty:
sudo systemctl enable bind9 Describe the process of installing and managing software on Ubuntu. nameserver 8.8.8.8 Use: A free S and telnet client for Windows.
Access Control Lists (ACLs) Update package lists: Security Enhanced Linux (SELinux) Functionality: Supports various network protocols, including S, telnet, and serial
What are ACLs and how do they differ from standard Linux permissions? sudo apt-get update What is SELinux and what are its benefits? connections.
ACLs (Access Control Lists) provide a more flexible permission mechanism than standard Install a package: SELinux (Security Enhanced Linux) is a security module for enforcing mandatory access Security: Secure when used with S.
Linux permissions by allowing multiple users and groups different levels of access to a sudo apt-get install package_name controls. Benefits include: How do you set up and use VNC and RDP for remote desktop access?
file or directory beyond the owner, group, and others. Remove a package: Enhanced Security: Limits the actions that can be performed by users and processes, VNC (Virtual Network Computing):
How do you set and modify ACLs on files and directories? sudo apt-get remove package_name even if they are compromised. Install a VNC server:
Set an ACL: Upgrade installed packages: Granular Control: Provides fine-grained access control policies. sudo apt-get install tightvncserver
sudo setfacl -m u:username:rwx file sudo apt-get upgrade Isolation: Separates applications and restricts their interactions. Start the VNC server:
Remove an ACL: Search for a package: How do you enable, disable, and configure SELinux policies? vncserver :1
sudo setfacl -x u:username apt-cache search package_name Check SELinux status: Connect using a VNC client:
Access Control Lists (ACLs) ( d) Understanding Routers & Switches sestatus Open a VNC client and connect to hostname:1.
How do you set and modify ACLs on files and directories? ( d) Explain the basic functions of routers and switches in a network. Enable or disable SELinux: RDP (Remote Desktop Protocol):
Remove an ACL: Routers: Edit /etc/selinux/config: Install xrdp:
sudo setfacl -x u:username file Function: Connects different networks and routes data between them. SELINUX=enforcing # Enable SELinux sudo apt-get install xrdp
View ACLs: IP Routing: Determines the best path for data to travel from source to destination. SELINUX=permissive # Disable SELinux enforcement, but log actions Start and enable xrdp service:
getfacl file Security: Can act as a firewall, filtering traffic based on IP addresses and ports. SELINUX=disabled # Completely disable SELinux sudo systemctl start xrdp
Set default ACLs (for directories): Switches: Set SELinux modes temporarily: sudo systemctl enable xrdp
sudo setfacl -d -m u:username:rwx directory Function: Connects devices within the same network (LAN). sudo setenforce 1 # Enable SELinux enforcing mode Connect using an RDP client:
Using Other Linux Distributions MAC Address Table: Uses MAC addresses to forward data to the correct device. sudo setenforce 0 # Set SELinux to permissive mode Use an RDP client like Microsoft Remote Desktop and connect to hostname.
Compare and contrast Ubuntu and CentOS. Segmentation: Reduces collisions by dividing a network into multiple collision domains. Configure SELinux policies:
Base System: How do you configure basic networking settings on a Linux system? Use semanage to manage SELinux policies:
Ubuntu is based on Debian. View current network settings:
CentOS is based on Red Hat Enterprise Linux (RHEL). ip a sudo semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
Package Management: Configure a static IP address: sudo restorecon -R /web
Ubuntu uses apt and dpkg for package management. Edit /etc/network/interfaces (Debian/Ubuntu) or /etc/sysconfig/network-scripts/ifcfg- Remote Access Tools
CentOS uses yum and rpm. eth0 (CentOS). Explain the use of telnet, s, and putty for remote access.
Default File System: Example for Debian/Ubuntu: telnet:

You might also like