Complete beginner to advanced command reference
The ls command is used to list files and directories in Linux. It is one of the most commonly used commands.
ls
ls -la
The cd command allows you to move between directories.
cd /var/www/html
Shows your current directory path.
pwd
Copies files and directories.
cp file.txt backup.txt
Moves or renames files.
mv old.txt new.txt
Deletes files and directories.
rm file.txt
rm -rf folder
Tests connectivity between your machine and another host.
ping google.com
Transfers data from or to a server.
curl https://example.com
Downloads files from the internet.
wget https://example.com/file.zip
Displays network connections and listening ports.
netstat -tulnp
Displays running processes.
ps aux
Shows real-time system usage.
top
Interactive process viewer (if installed).
htop
Terminates processes by PID.
kill 1234
Displays system information.
uname -a
Shows disk usage.
df -h
Displays memory usage.
free -m
Shows current logged-in user.
whoami