Linux Roadmap - roadmap.sh

Basic commands

Here's a table of some basic Linux commands along with their descriptions:

Command Description
ls List files and directories in the current directory
cd <dir> Change the current directory to <dir>
pwd Print the current working directory
mkdir <dir> Create a new directory named <dir>
rmdir <dir> Remove an empty directory named <dir>
rm <file> Remove a file named <file>
cp <src> <dest> Copy a file or directory from <src> to <dest>
mv <src> <dest> Move or rename a file or directory from <src> to <dest>
touch <file> Create a new empty file named <file> or update the timestamp of an existing file
cat <file> Display the contents of a file named <file>
more <file> View the contents of a file one screen at a time
less <file> View the contents of a file with backward navigation
head <file> Display the first 10 lines of a file named <file>
tail <file> Display the last 10 lines of a file named <file>
echo <text> Print <text> to the terminal
man <command> Show the manual page for <command>
chmod <permissions> <file> Change the permissions of <file>
chown <owner> <file> Change the owner of <file>
ps Display information about running processes
top Display running processes and system resource usage
kill <pid> Terminate the process with the specified process ID <pid>
df Display disk space usage for filesystems
du <dir> Display disk usage for files and directories
ifconfig Display network configuration (older versions)
ip a Display network configuration (newer versions)
ping <host> Send ICMP echo requests to network hosts
grep <pattern> <file> Search for a pattern in a file
find <dir> -name <name> Search for files and directories by name
history Show command history
sudo <command> Run a command with superuser (administrator) privileges
exit Exit the terminal or shell session