UnixDroid

Linux reference

Linux command finder

Search the commands you'll use every day — files, permissions, processes, networking and security.

$

ls -la

List all files with permissions, owner and size.

Files
cd /path

Change the current directory.

Files
pwd

Print the current working directory.

Files
cp -r src dst

Copy files or directories recursively.

Files
mv old new

Move or rename a file.

Files
rm -r dir

Remove a directory and its contents (careful!).

Files
find / -name file.txt

Search the filesystem for a file by name.

Search
grep -rni 'text' .

Recursively search for text, case-insensitive, with line numbers.

Search
cat file

Print file contents.

Text
less file

Scroll through a large file.

Text
tail -f /var/log/syslog

Follow a log file in real time.

Text
awk '{print $1}' file

Print the first column of each line.

Text
sort | uniq -c

Count unique lines (great for log analysis).

Text
chmod 755 file

Set rwx for owner, rx for group and others.

Permissions
chown user:group file

Change file owner and group.

Permissions
sudo command

Run a command as the superuser.

Permissions
id

Show current user ID and groups.

Permissions
ps aux

List all running processes.

Processes
top / htop

Live view of CPU and memory usage.

Processes
kill -9 PID

Force-stop a process by ID.

Processes
systemctl status ssh

Check the status of a service.

Processes
ip a

Show network interfaces and IP addresses.

Network
ss -tulpn

List listening ports and the processes using them.

Network
ping -c 4 host

Test connectivity to a host.

Network
curl -I https://site

Fetch HTTP response headers.

Network
dig example.com

Query DNS records.

Network
traceroute host

Show the network path to a host.

Network
sudo apt update && sudo apt upgrade

Update package lists and upgrade packages (Debian/Kali).

Packages
sudo apt install pkg

Install a package.

Packages
tar -xzvf file.tar.gz

Extract a gzip tar archive.

Archives
sha256sum file

Compute a file's SHA-256 checksum.

Security
last

Show recent logins.

Security
journalctl -xe

View recent system journal entries with details.

Security