Cheat Sheet about Linux commands

CategoryCommandDescription / UseExample
Directory NavigationpwdShows the current working directory.pwd
lsLists files and directories in the current location.ls -l (detailed list)
cdChanges the current directory.cd /home/user/Documents
cd ..Moves one level up in the directory tree.cd ..
mkdirCreates a new directory.mkdir projects
rmdirRemoves an empty directory.rmdir old_folder
File ManagementcpCopies files or directories.cp file.txt /home/user/
mvMoves or renames files and directories.mv file.txt newname.txt
rmDeletes files.rm file.txt
touchCreates an empty file.touch notes.txt
catDisplays the content of a file.cat notes.txt
nano / vimText editors from the terminal.nano script.sh
System ManagementtopShows running processes and system resource usage.top
psDisplays active processes.ps aux
killTerminates a process by ID.kill 1234
shutdownShuts down the system.sudo shutdown -h now
rebootRestarts the system.sudo reboot
dfShows disk usage.df -h
freeDisplays memory usage.free -m
Permissions & UserschmodChanges file permissions.chmod 755 script.sh
chownChanges file owner.sudo chown user file.txt
whoamiShows the current logged-in user.whoami
sudoRuns commands as superuser.sudo apt update
Network CommandspingChecks connection to a host or domain.ping google.com
ifconfig / ip aDisplays network configuration.ip a
wgetDownloads files from the web.wget https://example.com/file.txt
curlTransfers data from or to a server (APIs, web pages, etc.).curl https://api.github.com
Compression & ArchivestarCreates or extracts compressed archives.tar -czvf backup.tar.gz folder/
zip / unzipCompresses or extracts ZIP files.zip archive.zip file.txt
System InformationunameDisplays system information.uname -a
uptimeShows how long the system has been running.uptime
dateDisplays current date and time.date
calDisplays a calendar.cal