Linux Command Reference Manual
Navigation
Command Description Example
pwd Print current working directory pwd
ls List directory contents ls -l /home
cd Change directory cd /etc
tree Display directories as a tree tree /var/log
File Management
Command Description Example
cp Copy files or directories cp file.txt /tmp/
mv Move or rename files mv old.txt new.txt
rm Remove files or directories rm file.txt
touch Create an empty file touch new.txt
stat Show file details stat file.txt
file Determine file type file archive.tar.gz
Text Viewing & Editing
Command Description Example
cat Concatenate and show file cat file.txt
less View file with paging less /etc/passwd
head Show first lines of file head -n 10 file.txt
tail Show last lines of file tail -f logfile
nano Command-line text editor nano file.txt
vim Advanced text editor vim file.txt
sed Stream editor sed 's/foo/bar/g' file.txt
awk Pattern scanning & processing awk '{print $1}' file.txt
Users & Groups
Command Description Example
whoami Show current user whoami
id Print user ID and groups id
adduser Add a new user sudo adduser newuser
usermod Modify user account sudo usermod -aG sudo user
passwd Change user password passwd
groups Show user groups groups username
Permissions & Security
Command Description Example
chmod Change file permissions chmod 755 script.sh
chown Change file owner sudo chown user:user file.txt
umask Set default file permissions umask 022
setfacl Set file ACL setfacl -m u:username:r file.txt
getfacl Get file ACL getfacl file.txt