Useful terminal commands for Linux and Unix-based systems:

				
					ls - Lists files and directories in the current directory (ls -a for hidden files)
cd - Changes the current working directory
pwd - Prints the current working directory
mkdir - Creates a new directory
rmdir - Removes an empty directory
rm - Deletes files and directories
cp - Copies files and directories
mv - Moves or renames files and directories
cat - Displays the content of a file or concatenates multiple files
more - Displays the content of a file, one page at a time
less - Similar to 'more', but with more features and the ability to scroll both forward and backward
head - Displays the first few lines of a file
tail - Displays the last few lines of a file
grep - Searches for text patterns in files
echo - Prints text to the terminal or writes to a file
touch - Creates an empty file or updates the timestamp of an existing file
find - Searches for files and directories based on criteria
locate - Finds files quickly using an indexed database
chmod - Changes file permissions
chown - Changes file ownership
df - Displays disk space usage
du - Estimates the space used by files and directories
free - Shows the amount of free and used memory in the system
ps - Displays information about running processes
top - Displays a dynamic, real-time view of running processes
kill - Terminates a running process by its process ID
pkill - Terminates processes based on their name
killall - Terminates all instances of a specified process
uname - Displays system information, such as the kernel version and architecture
hostname - Shows or sets the system's hostname
whoami - Displays the current user's username
su - Switches the current user to another user account
sudo - Executes a command as another user, usually the superuser (root)
man - Displays the manual page for a command
history - Shows the command history
clear - Clears the terminal screen
exit - Exits the terminal or shell session
wget - Downloads files from the internet
curl - Transfers data using various network protocols (e.g., HTTP, FTP)
ssh - Connects to a remote server using the Secure Shell (SSH) protocol
scp - Copies files between hosts over SSH
rsync - Copies and synchronizes files and directories between local and remote systems
tar - Archives and compresses files and directories
gzip - Compresses and decompresses files using the gzip format
bzip2 - Compresses and decompresses files using the bzip2 format
zip - Compresses and decompresses files using the zip format
unzip - Extracts files from a zip archive
ifconfig - Displays and configures network interfaces (deprecated in favor of 'ip' command)
ip - Shows and manipulates routing, devices, policy routing, and tunnels
ping - Sends ICMP echo request packets to test network connectivity
awk - Text processing and data extraction tool
sed - Stream editor for filtering and transforming text
sort - Sorts lines of text
uniq - Removes duplicate lines from a sorted file
cut - Removes sections from each line of a file
paste - Merges lines of files
tr - Translates or deletes characters from input
wc - Displays the number of lines, words, and bytes in a file
nano - A user-friendly terminal text editor
vi - A powerful terminal text editor
emacs - A highly extensible and customizable text editor
cmp - Compares two files byte by byte
diff - Compares two files line by line
dd - Converts and copies a file with various options
file - Determines the file type of a file
stat - Displays file or file system status
ln - Creates hard and symbolic links between files
alias - Creates shortcuts for long or frequently used commands
unalias - Removes an alias
cron - Schedules tasks to run at specific times or intervals (use 'crontab' to edit)
at - Schedules a command to run at a specific time
nohup - Runs a command in the background even after the terminal is closed
bg - Resumes suspended jobs in the background
fg - Brings a background job to the foreground
jobs - Lists the jobs running in the background
useradd - Adds a new user to the system
userdel - Removes a user from the system
usermod - Modifies a user's account information
passwd - Changes a user's password
chsh - Changes a user's default shell
groups - Displays the groups a user is a member of
chgrp - Changes the group ownership of a file or directory
lsof - Lists open files and the processes that opened them
watch - Executes a command periodically and displays the output
dig - Queries DNS servers for domain information
nslookup - Queries DNS to resolve hostnames and IP addresses
traceroute - Traces the route packets take to reach a destination
netstat - Displays network connections, routing tables, and interface statistics
ss - A more powerful replacement for netstat
iptables - Administers the Linux kernel's packet filtering ruleset
dmesg - Displays kernel messages and driver information
lspci - Lists PCI devices and their properties
lsusb - Lists USB devices and their properties
dmidecode - Shows hardware information from the system's BIOS
mount - Mounts file systems
umount - Unmounts file systems
fsck - Checks and repairs file systems
mkfs - Creates a new file system on a device or partition
fdisk - Manipulates disk partition table
htop - An interactive process viewer (similar to top, but more user-friendly)
screen - Run multiple terminal sessions within a single window (reconnect with: screen -d -r)

				
			
Social Share: