Command Reference

Linux Commands

Essential Linux commands for cybersecurity professionals. Copy and use these commands in your terminal.

Showing 28 commands

File Operations

6 commands
ls -la

List all files with details

$ ls -la /home
cat

Display file contents

$ cat /etc/passwd
grep

Search text patterns

$ grep "error" /var/log/syslog
find

Search for files

$ find / -name "*.log"
chmod

Change file permissions

$ chmod 755 script.sh
chown

Change file ownership

$ chown user:group file.txt

Network

7 commands
ip addr

Show IP addresses

$ ip addr show eth0
netstat -tulpn

Show listening ports

$ netstat -tulpn | grep :80
ss -tulpn

Socket statistics

$ ss -tulpn
curl

Transfer data from URLs

$ curl -I https://example.com
wget

Download files

$ wget https://example.com/file.zip
ping

Test network connectivity

$ ping -c 4 google.com
traceroute

Trace packet route

$ traceroute google.com

Process

5 commands
ps aux

List all processes

$ ps aux | grep nginx
top

Real-time process viewer

$ top -u username
htop

Interactive process viewer

$ htop
kill

Terminate processes

$ kill -9 1234
systemctl

Service management

$ systemctl status nginx

System

5 commands
uname -a

System information

$ uname -a
df -h

Disk space usage

$ df -h
free -m

Memory usage

$ free -m
uptime

System uptime

$ uptime
whoami

Current user

$ whoami

Security

5 commands
sudo

Execute as superuser

$ sudo apt update
passwd

Change password

$ passwd username
iptables

Firewall management

$ iptables -L
ufw

Uncomplicated Firewall

$ ufw status
ssh

Secure shell connection

$ ssh user@host