This guide provides a structured approach to mastering Linux by focusing on key concepts, hands-on practice, and troubleshooting skills.
Divide Linux into manageable topics and study systematically. Key areas include:
ls
,cd
,pwd
,find
,du
,df
,mount
,umount
chmod
,chown
,chgrp
- Understand
rwx
and octal notation
ps
,top
,kill
,nice
,renice
,jobs
,bg
,fg
- RHEL:
yum
,dnf
,rpm
- Debian:
apt
,dpkg
ifconfig
,ip
,ping
,netstat
,ss
,nc
,ssh
,scp
/var/log
,journalctl
,rsyslog
vmstat
,iostat
,sar
,free
,uptime
- Basic scripts (
bash
, loops, conditionals)
useradd
,usermod
,passwd
,groups
,sudo
fdisk
,parted
,lsblk
,mkfs
,mount
,LVM
commands
systemctl
,service
,chkconfig
,systemd
concepts
Tip: Create a cheat sheet with commands and their flags for quick review.
- Use a home lab or virtual machines (e.g., VirtualBox, VMware, or cloud providers like Azure or AWS).
- Perform daily exercises like creating users, configuring networking, writing scripts, and troubleshooting services.
- Set up a cron job
- Check disk usage
- Configure permissions on a folder
Tip: Use platforms like TryHackMe, Hack The Box, or cloud sandboxes for practice.
Practice these common troubleshooting scenarios:
- System won’t boot: Analyze GRUB, fstab, or rescue mode.
- Disk space issues: Use
df
,du
,find
, andlsof
. - Services fail to start: Check logs (
systemctl status
,journalctl
). - Network issues: Use
ping
,traceroute
,netstat
,ss
,iptables
.
Tip: Document solutions to problems you encounter during practice.
- Permissions Mnemonic: "RWX = Read, Write, eXecute"
- Octal mapping:
4 = Read
,2 = Write
,1 = Execute
→7 = rwx
- Octal mapping:
- Systemctl Commands: Remember the sequence “start, stop, status, enable, disable, restart”.
- File System Hierarchy: Use associations like "bin = binaries," "etc = configuration files".
- Practice explaining concepts like boot process, file permissions, and LVM as if teaching someone.
- Simulate scenarios with a friend or use tools like ChatGPT for mock Q&A.
Familiarize yourself with important files:
/etc/passwd
,/etc/shadow
,/etc/group
→ User and password management/etc/fstab
→ File system table/var/log/
→ System logs/etc/crontab
→ Cron jobs/proc/
→ Kernel and process information
Tip: Remember these with a mental map of Linux directory structures.
- Summarize concepts and commands into small, quick-reference cheat sheets.
- Use flashcards (physical or apps like Anki) for repetitive practice.
- If you don’t know a solution immediately, focus on expressing your thought process:
- “I would start by checking logs using
journalctl
and verifying the service status withsystemctl status
.”
- “I would start by checking logs using
- A logical approach is often more important than memorization.
Relate tasks to real-world problems:
- How would you recover from a corrupted file system?
- How do you troubleshoot a failed SSH connection?
- How do you monitor CPU or memory usage?
The more you practice, the more confident and fluent you become. Repetition builds muscle memory for commands and processes.
Feel free to contribute with additional tips, examples, or real-life scenarios!
This guide provides a structured approach to mastering Linux by focusing on key concepts, hands-on practice, and troubleshooting skills.
Divide Linux into manageable topics and study systematically. Key areas include:
ls
,cd
,pwd
,find
,du
,df
,mount
,umount
chmod
,chown
,chgrp
- Understand
rwx
and octal notation
ps
,top
,kill
,nice
,renice
,jobs
,bg
,fg
- RHEL:
yum
,dnf
,rpm
- Debian:
apt
,dpkg
ifconfig
,ip
,ping
,netstat
,ss
,nc
,ssh
,scp
/var/log
,journalctl
,rsyslog
vmstat
,iostat
,sar
,free
,uptime
- Basic scripts (
bash
, loops, conditionals)
useradd
,usermod
,passwd
,groups
,sudo
fdisk
,parted
,lsblk
,mkfs
,mount
,LVM
commands
systemctl
,service
,chkconfig
,systemd
concepts
-
ls
: List directory contents. Use flags like-l
(long format) and-a
(show hidden files).
Example:ls -la
-
cd
: Change the current directory.
Example:cd /home/user
-
pwd
: Print the current working directory.
Example:pwd
-
find
: Search for files and directories based on name, size, or other criteria.
Example:find / -name "file.txt"
-
du
: Estimate disk usage of files and directories.
Example:du -sh /home/user
-
df
: Show available disk space on mounted filesystems.
Example:df -h
-
mount
: Mount a filesystem to a directory.
Example:mount /dev/sda1 /mnt
-
umount
: Unmount a mounted filesystem.
Example:umount /mnt
-
chmod
: Change file permissions. Use symbolic (u+x
) or octal (755
) modes.
Example:chmod 755 file.txt
-
chown
: Change file owner and group.
Example:chown user:group file.txt
-
chgrp
: Change group ownership of a file.
Example:chgrp groupname file.txt
-
ps
: Display information about active processes.
Example:ps aux
-
top
: Monitor real-time system processes and resource usage. -
kill
: Terminate a process using its PID.
Example:kill 1234
-
nice
: Run a process with a specified priority.
Example:nice -n 10 command
-
renice
: Change the priority of an already running process.
Example:renice -n 5 -p 1234
-
jobs
: List active background jobs. -
bg
: Resume a job in the background.
Example:bg %1
-
fg
: Resume a job in the foreground.
Example:fg %1
-
yum
: Install, update, and manage packages.
Example:yum install httpd
-
dnf
: Modern package manager for RHEL systems.
Example:dnf update
-
rpm
: Directly manage RPM packages.
Example:rpm -ivh package.rpm
-
apt
: Install and manage packages on Debian systems.
Example:apt install nginx
-
dpkg
: Low-level package manager for .deb files.
Example:dpkg -i package.deb
-
ifconfig
: Display or configure network interfaces.
Example:ifconfig eth0
-
ip
: Manage network interfaces and routing.
Example:ip addr show
-
ping
: Test connectivity to a host.
Example:ping google.com
-
netstat
: Display network connections and routing tables.
Example:netstat -tuln
-
ss
: Modern alternative tonetstat
for network statistics.
Example:ss -tuln
-
nc
: Network troubleshooting tool.
Example:nc -zv google.com 80
-
ssh
: Connect to a remote server via SSH.
Example:ssh user@host
-
scp
: Copy files over SSH.
Example:scp file.txt user@host:/path
-
journalctl
: View system logs.
Example:journalctl -u sshd
-
/var/log
: Central directory for log files. Check logs like/var/log/syslog
or/var/log/messages
.
-
fdisk
: Partition a disk.
Example:fdisk /dev/sda
-
parted
: Manage disk partitions interactively. -
lsblk
: Display information about block devices.
Example:lsblk
-
mkfs
: Create a filesystem on a partition.
Example:mkfs.ext4 /dev/sda1
-
mount
: Mount a filesystem to a directory. -
LVM Commands: Manage logical volumes.
Example:- Create a physical volume:
pvcreate /dev/sda1
- Create a volume group:
vgcreate vg_name /dev/sda1
- Create a logical volume:
lvcreate -L 10G -n lv_name vg_name
- Create a physical volume:
-
systemctl
: Manage services and systemd.
Example:systemctl start httpd
-
service
: Legacy tool for managing services.
Example:service httpd restart
-
chkconfig
: Manage services on boot (legacy systems).
Example:chkconfig httpd on
The more you practice, the more confident and fluent you become. Repetition builds muscle memory for commands and processes.
Feel free to contribute with additional command explanations, examples, or tips!