Notes on Linux Master Level 2 Exam Topics
Key Concepts of the Linux Master Level 2 Exam
Linux Commands and Configurations
RAID: Redundant Array of Independent Disks, a technology that combines multiple disks into a single unit.
- Types:
- Striping (RAID 0): Data is split across multiple disks; improves speed but not redundancy.
- Mirroring (RAID 1): Data is duplicated on two or more disks; offers redundancy.
- Parity: Uses parity data to provide fault tolerance in RAID setups.
- Example: A RAID 5 setup uses both striping and parity.
LVM: Logical Volume Manager, helps manage disk space flexibility.
- Components:
- Physical Volume (PV): Original disks or partitions.
- Volume Group (VG): Collection of PVs.
- Logical Volume (LV): The equivalent of a partition made from a VG.
- First component to create: Physical Volume (PV).
Printer and Scanner Commands
- Printer Commands:
- lp: Used to send files to the printer.
- lpstat: Lists the status of print jobs.
- Scanner Program: SANE (Scanner Access Now Easy) - a toolkit for scanner interface.
Package Management
- Debian Package Management:
- Removing vsftpd: Use
apt-get purge vsftpdto remove the package and its configuration.
- Removing vsftpd: Use
- RPM Commands:
- To remove a package without dependencies:
rpm -e nmap --nodeps.
- To remove a package without dependencies:
File and Process Management
- File Inspection:
- To view contents:
tar -tvfis often used for tar files.
- To view contents:
- Process Management Commands:
kill %2: Terminates background process number 2.ps: Displays processes running on the system.
User Interfaces and Editing
- vi Editor: Has commands for file manipulation and editing.
- Command Mode:
:wsaves changes,:qquits. - Specific commands to substitute text, like appending a period to lines ending with 'linux':
:%s/linux$/linux./.
- Command Mode:
- Emacs: Developed by Richard Stallman, a text editor with powerful features.
Cron Jobs
- To set up scheduled tasks:
- Format:
1 1 * * 1runs a script every Monday at 1:01 AM.
- Format:
Networking
- Network Commands:
ifconfig: Displays network interface configurations.netstat: Displays network connections.- Check the gateway address: Use
routecommand.
Security and Permissions
- File Permissions:
- Umask value of
0022results in default permissions of-rw-r--r--for new files.
- Umask value of
- Changing Ownership:
- Command:
chown username:group fileto change file owner and group.
- Command:
Virtualization and Clustering
- Virtualization Technologies:
- Xen, KVM: Supports paravirtualization.
- Clustering Solutions: Appropriate technology varies by objective (e.g., high-availability vs. compute-intensive tasks).
Shell Variables and Environment
- Common Shell Commands:
printenv: Displays all environment variables.- To change the shell: Use
chshcommand. - To view the current shell, run
echo $SHELL.
X Windows System
- X Windows Opening: Setting up to start X on boot:
- Configuration changes include setting default to graphical mode.
Miscellaneous
- Image Viewer: Example programs include
totem,GIMP,Eog. - Account Management and Authentication: Understand user roles and permissions across different Linux systems.