0% found this document useful (0 votes)
34 views2 pages

Ubuntu Commands

This document provides a comprehensive list of essential Ubuntu commands for various tasks such as file management, system monitoring, and package management. Each command is accompanied by a brief description of its function. The commands cover a wide range of operations, from navigating directories to managing processes and network configurations.

Uploaded by

opfarasat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Ubuntu Commands

This document provides a comprehensive list of essential Ubuntu commands for various tasks such as file management, system monitoring, and package management. Each command is accompanied by a brief description of its function. The commands cover a wide range of operations, from navigating directories to managing processes and network configurations.

Uploaded by

opfarasat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Essential Ubuntu Commands

pwd - Show current directory


ls - List files and directories
cd <dir> - Change directory
mkdir <dir> - Create a new directory
rmdir <dir> - Remove an empty directory
rm <file> - Delete a file
rm -r <dir> - Delete a directory with files
cp <source> <destination> - Copy files
mv <source> <destination> - Move or rename files
touch <file> - Create an empty file
cat <file> - Display file contents
nano <file> - Open file in Nano editor
vim <file> - Open file in Vim editor
head -n <num> <file> - Show first n lines of a file
tail -n <num> <file> - Show last n lines of a file
whoami - Show current user
id - Show user ID and group ID
chmod <mode> <file> - Change file permissions
chown <user>:<group> <file> - Change file ownership
sudo <command> - Run command as root
su <user> - Switch user
passwd - Change password
ps - List running processes
top - Display real-time process usage
htop - Interactive process viewer (requires installation)
kill <PID> - Kill a process by its PID
killall <process> - Kill all instances of a process
fg - Bring a background process to foreground
bg - Resume a background process
df -h - Show disk usage
du -sh <dir> - Show directory size
free -h - Show RAM usage
uptime - Show system uptime
uname -a - Show system information
cat /proc/cpuinfo - Show CPU details
cat /proc/meminfo - Show memory details
ifconfig - Show network interfaces (deprecated)
ip a - Show IP addresses
ping <host> - Test network connectivity
wget <URL> - Download file from the internet
curl <URL> - Fetch URL content
netstat -tulnp - Show open ports and services
ss -tulnp - Show active connections
sudo apt update - Update package lists
sudo apt upgrade - Upgrade installed packages
sudo apt install <package> - Install a package
sudo apt remove <package> - Remove a package
sudo apt autoremove - Remove unnecessary packages
echo "Hello, World!" - Print output
bash <script.sh> - Run a shell script
chmod +x <script.sh> - Make script executable
./script.sh - Execute script

You might also like