Linux Basics: Commands You’ll Actually Use
Linux · 7 min read · Published 2026-01-11
Navigation
move around
pwd # show current directory
ls -la # list all files (including hidden) with details
cd /path # change directory
cd .. # go up one folder
mkdir test # create folder
touch file.txt # create empty file
Reading files
view file contents
cat file.txt # print entire file
less file.txt # scroll through file
head -n 20 file.txt # first 20 lines
tail -n 20 file.txt # last 20 lines
grep -n "admin" file.txt # search for "admin" with line numbers
Permissions (important for security)
Permissions are a core security concept. Learn them early: read (r), write (w),
execute (x).
permissions basics
ls -l # view permissions
chmod 644 file.txt # rw-r--r--
chmod 755 script.sh # rwxr-xr-x
chown user:user file # change owner and group
Processes
process management
ps aux | head # view processes
top # live process view
kill -9 PID # kill a process by PID (use carefully)
whoami # current user
id # user + groups
Networking checks
quick network commands
ip a # show interfaces + IPs
ip r # show routes
ss -tulpen # show listening ports + processes
curl -I https://example.com # fetch headers only
ping -c 4 8.8.8.8 # basic connectivity check
Finding things
search files
find . -name "*.conf" # find files by name
find / -perm -4000 2>/dev/null # find SUID binaries (advanced)
which python # locate a command
whereis ssh # find binary + docs
Pro tip: keep notes like a pro
Create a “commands.md” file and add what you use often. Your future self will thank you.
← Back to Blog