← Free Resources
📝 Notes & Code⭐ Featured

🐧 Linux Commands Cheat Sheet

✍️ UyTech📅 Jul 6, 2026📝 7 blocks

Most-used Linux terminal commands for navigation, files, permissions, networking and processes.

bash

Navigation

pwd                          # print working directory
ls -la                       # list all files with details
cd /path/to/dir              # change directory
cd ~                         # go to home
cd -                         # previous directory
bash

File Operations

touch file.txt               # create empty file
mkdir -p dir/subdir          # create directories
cp -r src/ dest/             # copy recursively
mv old.txt new.txt           # move / rename
rm -rf dir/                  # remove directory (careful!)
find . -name "*.log"         # find files by name
bash

File Content

cat file.txt                 # print file
less file.txt                # page through file
head -n 20 file.txt          # first 20 lines
tail -f app.log              # follow log in real-time
grep -rn "pattern" ./        # search in files
bash

Permissions

chmod 755 script.sh          # set permissions
chown user:group file        # change owner
chmod +x script.sh           # make executable
ls -l                        # view permissions
bash

Process Management

ps aux                       # list processes
top                          # live process monitor
kill -9 <pid>                # force kill process
pkill <name>                 # kill by name
nohup ./app &                # run in background
bash

Networking

ping google.com              # test connectivity
curl -I https://example.com  # HTTP headers
wget <url>                   # download file
netstat -tlnp                # listening ports
ss -tulnp                    # socket stats (modern)
bash

System Info

uname -a                     # OS info
df -h                        # disk usage
free -h                      # memory usage
uptime                       # system uptime
whoami                       # current user
Tags:#linux#bash#terminal#commands

Want to test your skills?

Real interview questions from top tech companies