Hey everyone, hope you’re all doing great!
This is my first post here in the Linux section. Most of you probably don’t know me yet or maybe you do, but don’t know my background and interests in Linux.
Let me introduce myself:
I’m 7aMoDi from Iraq.
I’m a Network Engineer, Linux Administrator, and a programmer in both Python and C, with over 10 years of experience working with Linux, networking, and programming.
Today, I’m going to walk you through the most important Linux commands you’ll need whether you’re a regular user or someone working in a company managing a server.
These commands apply across all major Linux distributions, whether you're using Debian-based systems, Red Hat based systems, Arch, or anything in between.
I hope you find this helpful and useful in your daily Linux workflow.
Essential Linux Commands Every User Should Know
Linux is a powerful system that relies heavily on the terminal. Whether you're a beginner, developer, or cybersecurity student, these commands are the foundation of using Linux efficiently.
Here are the most important commands every Linux user should know:
1. Navigation Commands
pwd
Shows your current directory path.
ls
Lists files and directories.
ls -l detailed view
ls -a shows hidden files
ls -lh human-readable sizes
cd
Navigate between directories.
cd /path go to a specific folder
cd .. go back one level
cd ~ go to home directory
2. File & Directory Management
touch file
Create an empty file.
mkdir folder
Create a new directory.
cp src dest
Copy files or directories.
cp -r dir1 dir2 copy a full directory
mv old new
Move or rename a file.
rm file
Delete a file.
rm -r folder delete a folder
Be careful — this command can be dangerous with -r.
3. Reading & Searching Files
cat file
Display file content.
less file
View and scroll through large files.
head -n / tail -n
Show the first or last lines of a file.
grep "text" file
Search inside files.
grep -i ignore case
grep -r search in directories
4. Package Management (Depends on Distro)
Debian/Ubuntu
sudo apt update
sudo apt install pkg
sudo apt remove pkg
Fedora / RHEL
sudo dnf update
sudo dnf install pkg
sudo dnf remove pkg
Arch Linux
sudo pacman -Syu
sudo pacman -S pkg
sudo pacman -R pkg
5. Permissions & Ownership
chmod
Change file permissions.
chmod 755 file
chmod +x script.sh
chown
Change file owner:
sudo chown user:user file
6. Process Management
ps aux
List all running processes.
top / htop
Monitor CPU and RAM usage.
kill PID
Terminate a process.
7. Networking Commands
ifconfig / ip a
Show network information.
ping site.com
Test connectivity.
curl / wget
Download files or send HTTP requests.
8. System Management
sudo
Run commands as root.
systemctl
Manage system services:
systemctl status ssh
systemctl start ssh
systemctl enable ssh
journalctl
View system logs.
9. Compression & Archiving
tar
Compress and extract files:
tar -czvf file.tar.gz folder
tar -xzvf file.tar.gz
zip / unzip
Handle ZIP files.
10. Useful Daily Commands
clear Or Ctrl + L- Clear terminal screen
history - Show previously used commands
df -hDisk usage overview
du -sh folderShow folder size
whoami - Display current user
uname -a - System information
sudo !! Run last command as sudo