- ls - List directory contents
- $ ls -l
- cd - Change directory
- $ cd /home/user/documents
- pwd - Print current directory
- $ pwd
- mkdir - Create directories
- $ mkdir new_folder
- rmdir - Remove empty directories
- $ rmdir empty_folder
- rm - Remove files or directories
- $ rm file.txt
- cp - Copy files or directories
- $ cp source.txt destination.txt
- mv - Move or rename files or directories
- $ mv oldname.txt newname.txt
- touch - Create empty file or update timestamp
- $ touch newfile.txt
- find - Search for files in a directory hierarchy
- $ find /home -name '*.txt'
- locate - Find files by name
- $ locate filename.txt
- cat - Concatenate and display file content
- $ cat file.txt
- less - View file content, allowing navigation
- $ less file.txt
- head - Display the first part of a file
- $ head -n 10 file.txt
- tail - Display the last part of a file
- $ tail -n 10 file.txt
- du - Estimate file space usage
- $ du -sh /home/user/
- df - Report filesystem disk space usage
- $ df -h
- chmod - Change file permissions
- $ chmod 755 file.txt
- chown - Change file owner and group
- $ chown user:group file.txt
- ln - Create symbolic and hard links
- $ ln -s /path/to/file symlink_name
- nano - Simple text editor
- $ nano file.txt
- vim - Advanced text editor
- $ vim file.txt
- grep - Search for patterns within files
- $ grep 'pattern' file.txt
- awk - Pattern scanning and text processing
- $ awk '{print $1}' file.txt
- sed - Stream editor for filtering and transforming text
- $ sed 's/old/new/g' file.txt
- diff - Compare two files line by line
- $ diff file1.txt file2.txt
- sort - Sort lines of text files
- $ sort file.txt
- uniq - Report or omit repeated lines
- $ uniq file.txt
- wc - Count lines, words, and characters in a file
- $ wc -l file.txt
- cut - Remove sections from each line of files
- $ cut -d':' -f1 /etc/passwd
- uname - Print system information
- $ uname -a
- top - Display running processes
- $ top
- htop - Interactive process viewer
- $ htop
- ps - Report process status
- $ ps aux
- free - Display memory usage
- $ free -h
- uptime - Show system uptime
- $ uptime
- who - Show who is logged in
- $ who
- whoami - Print effective user ID
- $ whoami
- id - Print user and group information
- $ id
- hostname - Show or set the system's hostname
- $ hostname
- df -h - Show disk space usage in human-readable format
- $ df -h
- du -sh - Summarize the size of a directory
- $ du -sh /home/user
- uname -r - Display kernel version
- $ uname -r
- dmesg - Print or control the kernel ring buffer
- $ dmesg
- lscpu - Display CPU architecture info
- $ lscpu
- lsblk - List information about block devices
- $ lsblk
- lsusb - List USB devices
- $ lsusb
- lspci - List PCI devices
- $ lspci
- iostat - Report CPU and I/O statistics
- $ iostat
- vmstat - Report virtual memory statistics
- $ vmstat
- ping - Test network connectivity
- $ ping google.com
- curl - Transfer data to/from a server
- $ curl https://example.com
- wget - Non-interactive network downloader
- $ wget https://example.com/file.txt
- ifconfig - Configure network interfaces
- $ ifconfig
- ip - Show/manipulate routing, devices, policy routing, and tunnels
- $ ip a
- netstat - Print network connections, routing tables, interface statistics
- $ netstat -tuln
- ss - Dump socket statistics
- $ ss -tuln
- nslookup - Query DNS for domain names or IP addresses
- $ nslookup google.com
- traceroute - Trace the route to a network host
- $ traceroute google.com
- dig - DNS lookup utility
- $ dig google.com
- ssh - Secure Shell for remote login
- $ ssh user@hostname
- scp - Secure copy files between hosts
- $ scp file.txt user@remote:/path
- rsync - Remote file and directory synchronization
- $ rsync -av /source/ /destination/
- nmap - Network exploration tool and security scanner
- $ nmap -sP 192.168.1.0/24
- adduser - Add a user to the system
- $ sudo adduser username
- deluser - Remove a user from the system
- $ sudo deluser username
- passwd - Update a user’s password
- $ passwd username
- su - Substitute user identity
- $ su - username
- sudo - Execute a command as another user
- $ sudo command
- groups - Show user groups
- $ groups username
- usermod - Modify a user account
- $ sudo usermod -aG group username
- chown - Change file owner and group
- $ chown user:group file.txt
- chmod - Change file access permissions
- $ chmod 755 file.txt
- umask - Set default file permissions
- $ umask 022
- ps aux - View running processes for all users
- $ ps aux
- kill - Terminate a process by PID
- $ kill 1234
- killall - Kill processes by name
- $ killall process_name
- xkill - Kill a GUI application
- $ xkill
- jobs - List background jobs
- $ jobs
- bg - Resume a stopped job in the background
- $ bg %1
- fg - Bring a background job to the foreground
- $ fg %1
- nohup - Run a command immune to hangups
- $ nohup command &
- tar - Archive files
- $ tar -cvf archive.tar /path/to/files
- gzip - Compress files
- $ gzip file.txt
- gunzip - Decompress .gz files
- $ gunzip file.txt.gz
- zip - Compress files into a zip archive
- $ zip archive.zip file.txt
- unzip - Extract a zip archive
- $ unzip archive.zip
- apt-get - Package management command-line tool
- $ sudo apt-get update
- apt-cache - Query package information
- $ apt-cache search package_name
- dpkg - Debian package manager
- $ dpkg -i package.deb
- apt install <package> - Install a package
- $ sudo apt install vim
- apt update - Update package lists
- $ sudo apt update
- apt upgrade - Upgrade installed packages
- $ sudo apt upgrade
- apt remove <package> - Remove a package
- $ sudo apt remove vim
- yum - Package manager for RPM-based distributions
- $ sudo yum update
- rpm - Install, update, and query packages
- $ rpm -ivh package.rpm
- dnf - Updated package manager for Fedora
- $ sudo dnf install vim
- shutdown - Shut down the system
- $ sudo shutdown -h now
- reboot - Reboot the system
- $ sudo reboot
- systemctl - Control the systemd system and service manager
- $ sudo systemctl start service_name