Linux
File and Directory
cd
: Change directory
cd ~
: Go to home directory
cd ..
: Go to parent directory
pwd
: Print working directory
ls
: List files and directories
ls -l
: List files and directories with detailed information
mkdir
: Create a new directory
rm
: Remove a file or directory
rm -r
: Remove a directory and its contents
cp
: Copy a file
cp -r
: Copy a directory and its contents
mv
: Move or rename a file
mv -r
: Move or rename a directory and its contents
File Editing
touch
: Create a new empty file
cat
: Display the contents of a file
less
: Display the contents of a file with pagination
head
: Display the first few lines of a file
tail
: Display the last few lines of a file
nano
: Edit a file with the nano editor
vim
: Edit a file with the vim editor
uname -a
: Display system information
hostname
: Display the system hostname
uptime
: Display system uptime
whoami
: Display the current user
who
: Display currently logged-in users
Process Management
ps
: Display running processes
ps -ef
: Display all running processes with detailed information
kill
: Kill a process
killall
: Kill all processes with a specific name
bg
: Run a process in the background
fg
: Bring a background process to the foreground
Network
ping
: Test network connectivity
ssh
: Connect to a remote system via SSH
scp
: Copy files over SSH
wget
: Download a file from the internet
curl
: Transfer data to or from a web server
Package Mangement
apt-get
: Package manager for Debian-based systems
yum
: Package manager for RPM-based systems
pip
: Manage Python packages
Security
sudo
: Run a command with superuser privileges
chmod
: Change file permissions
chown
: Change file ownership
ssh-keygen
: Generate SSH keys
System Administration
useradd
: Add a new user
userdel
: Delete a user
groupadd
: Add a new group
groupdel
: Delete a group
passwd
: Change user passwords
File System
df
: Display disk usage
du
: Display directory usage
fsck
: Check and repair filesystems
mount
: Mount filesystems
umount
: Unmount filesystems