Terminal

Linux & macOS CLI Reference

NavigationDescription
pwdShow current directory
ls -laList all files with details
cd /pathChange directory
mkdir folderCreate new folder
File OpsDescription
touch file.txtCreate empty file
cp file1 file2Copy file
mv file folder/Move file
rm file.txtDelete file
PermissionsDescription
chmod +x script.shMake script executable
chown user fileChange file owner
sudoRun as superuser
whoamiShow current user
System InfoDescription
uname -aSystem details
topLive process monitor
df -hDisk usage
free -mMemory usage
Package ToolsDescription
apt updateUpdate package list (Debian)
brew installInstall via Homebrew (macOS)
yum installInstall via YUM (RHEL)
pacman -SInstall via Pacman (Arch)