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 tree

File 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.txt

Directory Operations

Work with directories using these commands.

mkdir newdir
rmdir emptydir
rm -r nonemptydir

Viewing & Editing Files

Display and edit file contents with these tools.

nano file.txt
less file.txt
head file.txt
tail -n 20 file.txt

Searching

Find text inside files or locate files in the system.

grep "hello" file.txt
find /home -name "*.txt"
locate file.txt

Permissions

Change file ownership and access rights.

ls -l
chmod 755 script.sh
chown user:user file.txt

Process Management

Monitor running processes and stop them if needed.

ps aux
top
kill -9 process_id

System Info

Commands to check OS, memory, and disk usage.

uname -a
df -h
du -sh *
free -m

Networking

Test connections and download files.

ping google.com
curl https://example.com
wget https://example.com/file.zip
ifconfig   # or: ip addr

Archiving & 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.zip

Package 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                          # macOS

User Management

Manage users and passwords on a Linux system.

whoami
adduser newuser
passwd newuser

History & 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 Hello

How to use this page

  1. Start with navigation and file operations.
  2. Learn how to manage users, processes, and permissions.
  3. Explore system monitoring and networking commands.
  4. Practice pipes, redirection, and search utilities.

🚀 Explore More Free Developer Tools

Don’t stop here! Supercharge your workflow with our other powerful converters & formatters.

💡 New tools are added regularly — bookmark DevUtilsX and stay ahead!

Want to support my work?

Buy me a coffee