Common Linux Terminal Commands: A Quick Reference Guide

CommandDescription
lsList directory contents
cd [directory]Change the current directory to [directory]. If [directory] is not provided, changes to the home directory
pwdPrint the path of the current working directory
cat [file]Display the contents of a [file]
echo [text]Print [text] to the terminal
man [command]Display the manual page for [command]
cp [source] [destination]Copy [source] to [destination]
mv [source] [destination]Move [source] to [destination]
rm [file]Remove a [file]
mkdir [directory]Create a new directory named [directory]
rmdir [directory]Remove an empty directory named [directory]
touch [file]Create a new empty file, or update the timestamp on an existing file
find [directory] -name [filename]Find a file or a directory by name
grep [pattern] [file]Search for [pattern] in [file]
sudo [command]Execute [command] with superuser (root) privileges
chmod [permissions] [file]Change the permissions of [file] to [permissions]
chown [user]:[group] [file]Change the owner and group of a [file]
psReport a snapshot of the current processes
topDisplay Linux tasks
exitExit the shell or your current session

Hello, I’m Anuj. I make and teach software.

My website is free of advertisements, affiliate links, tracking or analytics, sponsored posts, and paywalls.
Follow me on LinkedIn, X (twitter) to get timely updates when I post new articles.
My students are the reason this website exists, crafted with the affection and dedication they’ve shown. ❤️

Feedback Display