Linux Command Master Reference
Comprehensive Linux command reference with search, filtering, and interactive examples for system administrators and developers.
Loading... commands
0 visible
0 categories
Quick Reference - Most Used Commands
ls
List directory contents
cd
Change directory
cp
Copy files/directories
mv
Move/rename files
rm
Remove files/directories
grep
Search text patterns
chmod
Change permissions
sudo
Execute as superuser
File Management Commands
ls
Basic
Popular
List directory contents with various options for formatting and sorting.
ls [OPTIONS] [FILE]...
Examples:
ls -la
ls -lh
ls -t
cd
Basic
Change the current working directory. Use '-' to go to previous directory.
cd [DIRECTORY]
Examples:
cd /var/www
cd ~
cd -
cp
Basic
Copy files and directories. Use -r for recursive copy of directories.
cp [OPTIONS] SOURCE DEST
Examples:
cp file.txt backup/
cp -r directory/ backup/
mv
Basic
Move or rename files and directories. Also used for batch file operations.
mv [OPTIONS] SOURCE DEST
Examples:
mv oldname.txt newname.txt
mv *.txt archive/
rm
Basic
Remove files or directories. Warning: Use with caution, especially with -rf flags.
rm [OPTIONS] FILE...
Examples:
rm file.txt
rm -rf directory/
mkdir
Basic
Create new directories. Use -p to create parent directories as needed.
mkdir [OPTIONS] DIRECTORY...
Examples:
mkdir new_folder
mkdir -p /path/to/directory
touch
Basic
Create empty files or update timestamps of existing files.
touch [OPTIONS] FILE...
Examples:
touch newfile.txt
find
Advanced
Search for files in a directory hierarchy with powerful filtering options.
find [PATH] [OPTIONS] [EXPRESSION]
Examples:
find . -name "*.txt"
find /home -size +100M
System Information Commands
uname
Basic
Display system information including kernel name, version, and hardware.
uname [OPTIONS]
Examples:
uname -a
df
Basic
Display disk space usage for file systems. Use -h for human-readable format.
df [OPTIONS] [FILE]...
Examples:
df -h
free
Basic
Display amount of free and used memory in the system. Use -h for human-readable.
free [OPTIONS]
Examples:
free -h
top
Basic
Popular
Display real-time system processes and resource usage. Press 'q' to quit.
top [OPTIONS]
Examples:
top
htop
Advanced
Interactive process viewer with colorful interface and mouse support.
htop [OPTIONS]
Examples:
htop
uptime
Basic
Display how long the system has been running, load averages, and logged-in users.
uptime [OPTIONS]
Examples:
uptime
ps
Basic
Display information about running processes. Use aux for detailed list.
ps [OPTIONS]
Examples:
ps aux
User Management Commands
useradd
Advanced
Create a new user account. Requires sudo/root privileges.
useradd [OPTIONS] USERNAME
Examples:
sudo useradd -m username
passwd
Basic
Change user password. Use without arguments to change current user's password.
passwd [USERNAME]
Examples:
sudo passwd username
usermod
Advanced
Modify user account properties like groups, home directory, or shell.
usermod [OPTIONS] USERNAME
Examples:
sudo usermod -aG sudo username
userdel
Advanced
Delete user account. Use -r to remove home directory and mail spool.
userdel [OPTIONS] USERNAME
Examples:
sudo userdel -r username
who
Basic
Display information about users currently logged into the system.
who [OPTIONS]
Examples:
who
id
Basic
Display user and group information for the specified user or current user.
id [USERNAME]
Examples:
id
Package Management Commands (Ubuntu/Debian)
apt update
Basic
Update package lists from repositories. Should be run before installing new packages.
apt update
Examples:
sudo apt update
apt upgrade
Basic
Upgrade installed packages to their latest versions. Use -y to skip confirmation.
apt upgrade [OPTIONS]
Examples:
sudo apt upgrade -y
apt install
Basic
Popular
Install new packages from repositories. Can install multiple packages at once.
apt install PACKAGE...
Examples:
sudo apt install nginx
apt remove
Basic
Remove installed packages while keeping configuration files. Use purge to remove everything.
apt remove PACKAGE...
Examples:
sudo apt remove package-name
apt search
Basic
Search for packages in repositories by keyword. Useful for finding software.
apt search KEYWORD
Examples:
apt search nginx
apt list
Basic
List packages based on criteria. Use --installed to see installed packages.
apt list [OPTIONS]
Examples:
apt list --installed
dpkg
Advanced
Low-level package manager for Debian. Used to install local .deb files.
dpkg [OPTIONS] ACTION
Examples:
sudo dpkg -i package.deb
Network Commands
ping
Basic
Popular
Test network connectivity to a host. Sends ICMP echo requests and measures response time.
ping [OPTIONS] HOST
Examples:
ping google.com
ifconfig
Basic
Display or configure network interfaces. (Deprecated, use 'ip' command instead)
ifconfig [INTERFACE] [OPTIONS]
Examples:
ifconfig
ip
Advanced
Modern replacement for ifconfig. Show/manipulate routing, network devices, and tunnels.
ip [OPTIONS] OBJECT COMMAND
Examples:
ip addr show
netstat
Advanced
Display network connections, routing tables, interface statistics, and masquerade connections.
netstat [OPTIONS]
Examples:
netstat -tuln
curl
Basic
Popular
Transfer data from or to a server. Supports various protocols including HTTP, HTTPS, FTP.
curl [OPTIONS] URL
Examples:
curl https://example.com
wget
Basic
Download files from the web. Supports recursive downloads and resume functionality.
wget [OPTIONS] URL
Examples:
wget https://example.com/file.zip
ssh
Basic
Popular
Secure Shell - log into remote machines and execute commands securely.
ssh [OPTIONS] USER@HOST
Examples:
ssh user@192.168.1.100
chmod
Basic
Popular
Change file mode bits (permissions). Can use numeric (755) or symbolic (u+x) notation.
chmod [OPTIONS] MODE FILE...
Examples:
chmod 755 script.sh
chmod +x script.sh
chown
Basic
Change file owner and group. Usually requires superuser privileges.
chown [OPTIONS] OWNER[:GROUP] FILE...
Examples:
sudo chown user:group file.txt
chgrp
Basic
Change group ownership of files. Alternative to chown for changing group only.
chgrp [OPTIONS] GROUP FILE...
Examples:
sudo chgrp www-data file.txt
umask
Advanced
Set default permissions for newly created files and directories.
umask [OPTIONS] [MASK]
Examples:
umask 022
Process Management Commands
ps
Basic
Report a snapshot of current processes. Use aux for detailed output.
ps [OPTIONS]
Examples:
ps aux | grep nginx
kill
Basic
Send signals to processes. Default signal is TERM (15). Use -9 for force kill.
kill [OPTIONS] PID
Examples:
kill 1234
pkill
Basic
Send signals to processes by name instead of PID. Useful for killing processes by name.
pkill [OPTIONS] PATTERN
Examples:
pkill firefox
bg
Advanced
Place a job in the background, allowing it to run while you use the terminal.
bg [JOB_SPEC]
Examples:
bg %1
fg
Advanced
Bring a background job to the foreground, making it the active terminal process.
fg [JOB_SPEC]
Examples:
fg %1
Text Processing Commands
grep
Basic
Popular
Search text patterns in files. Powerful for filtering and searching through output.
grep [OPTIONS] PATTERN [FILE]...
Examples:
grep "error" logfile.txt
sed
Advanced
Stream editor for filtering and transforming text. Powerful for batch editing.
sed [OPTIONS] SCRIPT [FILE]...
Examples:
sed 's/old/new/g' file.txt
awk
Advanced
Pattern scanning and processing language. Excellent for text extraction and reporting.
awk [OPTIONS] 'PROGRAM' [FILE]...
Examples:
awk '{print $1}' file.txt
sort
Basic
Sort lines of text files. Can sort alphabetically, numerically, or by other criteria.
sort [OPTIONS] [FILE]...
Examples:
sort file.txt
Linux Command Cheat Sheet
File Operations
cat file
Display file contents
head -n 5 file
Show first 5 lines
tail -f file
Follow file in real-time
wc -l file
Count lines in file
Search Operations
grep -r "text" .
Recursive search
find . -type f -name "*.txt"
Find text files
locate filename
Quick file search
which command
Find command path
Network Operations
ssh user@host
Remote login
scp file user@host:/path
Secure copy
netstat -an | grep LISTEN
Show listening ports
dig example.com
DNS lookup
System Operations
sudo !!
Repeat last command as sudo
history | grep apt
Search command history
tar -czvf archive.tar.gz dir/
Create compressed archive
du -sh *
Show directory sizes
Terminal Simulator
$ Welcome to Linux Command Reference Terminal Simulator
$ Try typing commands like 'ls', 'pwd', or 'date'
$ Type 'help' for available commands
$