awk: Text processing and pattern matching.
awk '/pattern/ {action}' filename
sed: Stream editing for transforming text.
sed -i 's/old/new/g' filename
grep: Searches for patterns in text.
grep -P '^a.*z$' filename
tcpdump: Captures and analyzes network packets.
tcpdump -i eth0 'port 80'
netstat: Displays network connections, routing tables, and statistics.
iptables: Manages Linux firewall rules.
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
systemctl: Controls the systemd system and service manager.
strace: Traces system calls and signals.
lsof: Lists open files and the processes that opened them.
rsync: Efficient file copying and synchronization.
perf: Performance analyzing tool.
perf stat -B dd if=/dev/zero of=/dev/null count=1000000
vmstat: Reports virtual memory statistics.
sar: System activity reporter.
ss: Investigates sockets.
find: Searches for files in a directory hierarchy.
find / -type f -name 'config.php' -exec chmod 644 {} \;
nmap: Network exploration and security auditing.
htop: Interactive process viewer.
iostat: Monitors system input/output device loading.
dstat: Versatile tool for generating system resource statistics.
iftop: Displays bandwidth usage on an interface.
ip: Shows and manipulates routing, devices, policy routing, and tunnels.
dig: DNS lookup.
dig +trace yourdomain.com
watch: Executes a program periodically, showing output.
crontab: Manages a cron table for scheduling tasks.
mdadm: Manages MD (multi-disk) devices for RAID arrays.
chroot: Changes the root directory.
GnuPG: Encrypts and signs data.
gpg --encrypt --recipient name@example.com file.txt
traceroute: Traces the route packets take to a network host.
journalctl: Queries the systemd journal.
journalctl -u nginx.service --since yesterday
nmcli: NetworkManager command-line tool.
firewall-cmd: Manages firewalld settings.
bpftrace: Traces Linux kernel using BPF.
bpftrace -e 'tracepoint:syscalls:sys_enter_* { @[probe] = count(); }'
fail2ban: IP banning to protect against brute-force attacks.
fail2ban-client status sshd
ipset: Creates IP collections for use with iptables.
ipset create test hash:ip
iotop: Monitors I/O usage by processes.
mtr: Network diagnostic tool.
glances: System monitoring tool.
ncdu: Disk usage analyzer with an ncurses interface.
dd: Convert and copy a file.
dd if=/dev/zero of=/dev/sda bs=1M count=1024
fuser: Identify processes using files or sockets.
kdump: Kernel crash dumping mechanism.
parted: Disk partitioning and resizing tool.
lsblk: List information about block devices.
pv: Monitor the progress of data through a pipeline.
pv data.file | gzip > data.file.gz
mount: Mount a filesystem.
umount: Unmount file systems.
renice: Alter priority of running processes.
at: Schedule commands to be executed at a particular time.
echo "echo hello" | at now + 1 minute
scp: Secure copy of files over the network.
scp localfile user@remote:/path
tar: Archive files into a tape archive (tar) format.
tar -czvf archive.tar.gz /path/to/directory
curl: Tool to transfer data from or to a server.
curl -O http://example.com/file.zip
wget: Non-interactive network downloader.
wget http://example.com/file.zip
ssh: Secure Shell, a protocol for secure remote login and other secure network services.
scp: Secure copy (remote file copy program).
scp file.txt user@host:/path
rsnapshot: Local and remote filesystem snapshot utility.
vim: Highly configurable text editor.
nano: Easy-to-use text editor.
git: Distributed version control system.
git clone https://github.com/user/project.git
screen: Full-screen window manager that multiplexes a physical terminal.
tmux: Terminal multiplexer, lets you switch easily between several programs in one terminal.
ansible: Automation tool for software provisioning, configuration management, and application deployment.
terraform: Tool for building, changing, and versioning infrastructure safely and efficiently.
docker: Platform for developers and sysadmins to develop, deploy, and run applications with containers.
docker run --name web -p 8080:80 nginx
kubectl: Command line tool for controlling Kubernetes clusters.
helm: Kubernetes package manager.
helm install my-release mychart
ufw: Uncomplicated Firewall, frontend for iptables.
ufw allow from 192.168.1.1 to any port 22
fail2ban-client: Interface to Fail2Ban.
apachectl: Control interface for Apache HTTP server.
mysql: Command-line tool for managing MySQL databases.
pg_dump: Backup database utility for PostgreSQL.
pg_dump -U user dbname > outfile
top: Displays Linux processes.
ps: Reports a snapshot of the current processes.
kill: Send a signal to a process.
killall: Kill processes by name.
nohup: Run a command immune to hangups, with output to a non-tty.
du: Disk usage statistics.
du -sh /path/to/directory
df: Report file system disk space usage.
free: Display amount of free and used memory in the system.
ln: Make links between files.
chmod: Change file mode bits.
chown: Change file owner and group.
useradd: Create a new user or update default new user information.
usermod: Modify a user account.
usermod -aG sudo username
userdel: Delete a user account and related files.
groupadd: Create a new group.
groupdel: Delete a group.
hostnamectl: Control the system hostname.
hostnamectl set-hostname newname
locale: Get or set system locale and related settings.
date: Display or set system date and time.
uptime: Tell how long the system has been running.
who: Show who is logged on.
w: Show who is logged on and what they are doing.
last: Show listing of last logged in users.
mount: Mount a filesystem.
umount: Unmount file systems.
reboot: Reboot the system.
shutdown: Bring the system down.
history: Show command history.
alias: Create or remove aliases.
unalias: Remove alias definitions.
- unalias ll