Linux commands form the backbone of using and managing a Linux system. This guide covers the most essential commands every Linux user should know.
ls
Options:
ls -l
for detailed listing. ls -a
to include hidden files.cd
Use cd ..
to move up one level.
pwd
mkdir
rmdir
Use rm -r <directory_name>
for non-empty directories.
cp
Use cp -r
for directories.
mv
rm
cat
Use tac <file_name>
to display content in reverse.
less
head
tail
nano
Use vi <file_name>
or vim <file_name>
for advanced editing.
ls -l
chmod
Examples:
chmod 755 <file_name>
chmod +x <file_name>
to make a file executable.chown
ps aux
Use top
or htop
for an interactive process viewer.
kill
Use kill -9 <process_id>
for a forced termination.
free -h for memory usage.
df -h for disk usage.
ip a
Use ifconfig
if ip
is unavailable.
ping
wget
curl -O
find
grep
Use grep -r <pattern> <directory>
for recursive searches.
sudo adduser
su
whoami
uptime
journalctl
Use dmesg
for kernel logs.
df -h
df -i
tar -cvf
tar -xvf
gzip
gunzip
sudo apt-get update
sudo apt-get install
sudo yum update
sudo yum install
sudo pacman -Syu
sudo pacman -S
Learning these commands will help you become proficient in navigating and managing a Linux system.
Use the man
command (e.g., man ls
) for detailed information about any command.