Linux Command Line Cheatsheet
A beginner-friendly guide to Linux commands. Learn how to navigate files, manage processes, set permissions, and more.
Navigation
Use these commands to explore files and directories in Linux.
pwd        # Print working directory
ls -l     # List files with details
cd /path  # Change directory
tree      # Show directory treeFile Operations
Commands for creating, copying, moving, and deleting files.
touch file.txt
cat file.txt
cp file.txt backup.txt
mv file.txt newname.txt
rm file.txtDirectory Operations
Work with directories using these commands.
mkdir newdir
rmdir emptydir
rm -r nonemptydirViewing & Editing Files
Display and edit file contents with these tools.
nano file.txt
less file.txt
head file.txt
tail -n 20 file.txtSearching
Find text inside files or locate files in the system.
grep "hello" file.txt
find /home -name "*.txt"
locate file.txtPermissions
Change file ownership and access rights.
ls -l
chmod 755 script.sh
chown user:user file.txtProcess Management
Monitor running processes and stop them if needed.
ps aux
top
kill -9 process_idSystem Info
Commands to check OS, memory, and disk usage.
uname -a
df -h
du -sh *
free -mNetworking
Test connections and download files.
ping google.com
curl https://example.com
wget https://example.com/file.zip
ifconfig   # or: ip addrArchiving & Compression
Create and extract compressed files with tar and zip tools.
tar -cvf archive.tar files/
tar -xvf archive.tar
gzip file.txt
gunzip file.txt.gz
unzip file.zipPackage Management
Install and update software with package managers (depends on Linux distribution).
sudo apt update && sudo apt install git   # Debian/Ubuntu
sudo yum install git                      # CentOS/RHEL
brew install git                          # macOSUser Management
Manage users and passwords on a Linux system.
whoami
adduser newuser
passwd newuserHistory & Aliases
See past commands and create shortcuts with aliases.
history
alias ll='ls -la'Redirection & Pipes
Redirect input/output and combine commands using pipes.
echo "Hello" > file.txt
echo "World" >> file.txt
cat file.txt | grep HelloHow to use this page
- Start with navigation and file operations.
- Learn how to manage users, processes, and permissions.
- Explore system monitoring and networking commands.
- Practice pipes, redirection, and search utilities.
π Explore More Free Developer Tools
Donβt stop here! Supercharge your workflow with our other powerful converters & formatters.
π Docker Cheatsheet
Docker Cheatsheet
π MongoDB Cheatsheet
MongoDB Cheatsheet
π Git Cheatsheet
Git Cheatsheet
π‘ New tools are added regularly β bookmark DevUtilsX and stay ahead!
Want to support my work?
Buy me a coffee