Title here
Summary here
Welcome to the Linux Command Cheatsheet, a quick reference guide for essential Linux commands. Whether you’re a beginner or an experienced user, this cheatsheet is designed to help you navigate the command line efficiently. Each entry provides a brief description and example usage to assist you in mastering these powerful commands.
File System Navigation
Command | Description | Example | Further Reference |
---|---|---|---|
cd | Change directory | cd Documents | Official Documentation |
ls | List directory contents | ls -l | GNU Coreutils |
pwd | Print working directory | pwd | GNU Coreutils |
File Operations
Command | Description | Example | Further Reference |
---|---|---|---|
cp | Copy files/directories | cp file.txt /path/to/destination | GNU Coreutils |
mv | Move/rename files/directories | mv old.txt new.txt | GNU Coreutils |
rm | Remove/delete files | rm file.txt | GNU Coreutils |
Directory Operations
Command | Description | Example | Further Reference |
---|---|---|---|
mkdir | Create a new directory | mkdir my_folder | GNU Coreutils |
rmdir | Remove an empty directory | rmdir empty_folder | GNU Coreutils |
rm -r | Remove a directory and its contents | rm -r my_folder | GNU Coreutils |
Text File Manipulation
Command | Description | Example | Further Reference |
---|---|---|---|
cat | Display file contents | cat file.txt | GNU Coreutils |
nano | Text editor for file editing | nano file.txt | GNU Nano Manual |
grep | Search for a pattern in files | grep "pattern" file.txt | GNU Grep Manual |
User and Permission Management
Command | Description | Example | Further Reference |
---|---|---|---|
whoami | Display current username | whoami | GNU Coreutils |
chmod | Change file permissions | chmod 755 file.txt | GNU Coreutils |
chown | Change file owner | chown user:group file.txt | GNU Coreutils |
System Information
Command | Description | Example | Further Reference |
---|---|---|---|
uname | Display system information | uname -a | GNU Coreutils |
df | Display disk space usage | df -h | GNU Coreutils |
top | Display real-time system statistics | top | Linux Top Command |
Package Management
Command | Description | Example | Further Reference |
---|---|---|---|
apt-get | Package management for Debian-based systems | apt-get install package | Debian Apt-get Documentation |
yum | Package management for RPM-based systems | yum install package | Yum Documentation |
pacman | Package management for Arch Linux | pacman -S package | Arch Linux Pacman |
Network Commands
Command | Description | Example | Further Reference |
---|---|---|---|
ifconfig | Display network interface information | ifconfig | Linux ifconfig Command |
ping | Test network connectivity | ping google.com | Linux Ping Command |
netstat | Display network statistics | netstat -a | Linux Netstat Command |
Process Management
Command | Description | Example | Further Reference |
---|---|---|---|
ps | Display information about active processes | ps aux | Linux ps Command |
kill | Terminate a process | kill -9 PID | Linux Kill Command |
htop | Interactive process viewer | htop | htop Documentation |
Archiving and Compression
Command | Description | Example | Further Reference |
---|---|---|---|
tar | Create and extract tar archives | tar -cvf archive.tar files/ | GNU Tar Manual |
gzip | Compress or decompress files | gzip file.txt | GNU Gzip Manual |
zip | Create a zip archive | zip archive.zip files/ | Info-ZIP Documentation |
Feel free to bookmark this cheatsheet for quick access to commonly used Linux commands. Happy coding!