ls -lahList files with details, including hidden files, in human-readable sizes.File permissions, processes, disk usage, and networking — grouped by task, with the flags you actually use in practice.
ls -lahList files with details, including hidden files, in human-readable sizes.chmod 755 file.shOwner: read/write/execute. Group and others: read/execute.chown user:group fileChange the owner and group of a file.find . -name "*.log"Find files matching a pattern starting from the current directory.grep -r "TODO" .Search recursively for a text pattern in all files.tar -xzvf file.tar.gzExtract a gzip-compressed tar archive.ln -s /path/target linknameCreate a symbolic link.cp -r src/ dest/Copy a directory recursively.mv old.txt new.txtMove or rename a file.chmod +x script.shMake a file executable.head -n 20 file.logShow the first 20 lines of a file.tail -f file.logFollow a file's new content in real time, useful for logs.wc -l file.txtCount the number of lines in a file.sed 's/foo/bar/g' file.txtReplace all occurrences of "foo" with "bar" in a file's output.awk '{print $1}' file.txtPrint the first column of each line.ps auxList all running processes with details.top / htopInteractive, real-time view of running processes and resource usage.kill PIDAsk a process to terminate gracefully.kill -9 PIDForce-kill a process immediately, no cleanup.pkill -f "name"Kill processes matching a name pattern, without needing the PID.nohup command &Run a command in the background, immune to hangups (e.g. closing the terminal).jobs / fg / bgList, foreground, or background the current shell's jobs.ps -ef --forestShow processes as a tree, revealing parent/child relationships.renice -n 10 -p PIDLower a running process's CPU scheduling priority.uptimeShow how long the system has been running and the load average.systemctl status servicenameCheck the status of a systemd service.systemctl restart servicenameRestart a systemd service.df -hShow disk space usage per mounted filesystem, human-readable.du -sh *Show the size of each file/folder in the current directory.du -sh . --max-depth=1Show sizes one level deep, useful for finding what's taking up space.lsblkList block devices (disks and partitions) attached to the system.mount /dev/sdX1 /mntMount a partition to a directory.umount /mntUnmount a mounted filesystem.fdisk -lList disk partitions and their details.rsync -avh src/ dest/Sync files/directories efficiently, only copying changes.ss -tulpnList listening ports and the processes using them (modern netstat replacement).lsof -i :PORTFind which process is using a specific port.curl -I https://example.comFetch only the HTTP headers of a URL, useful for quick checks.ping -c 4 hostSend 4 ping packets to a host and stop.traceroute hostShow the network path packets take to reach a host.scp file user@host:/pathCopy a file to a remote host over SSH.wget https://example.com/fileDownload a file from a URL.ssh user@hostOpen a secure shell session on a remote host.ip aShow network interfaces and their IP addresses.dig example.comQuery DNS records for a domain.netstat -tulpnOlder alternative to ss for listing listening ports and processes.Run sudo lsof -i :PORT, replacing PORT with the port number. It lists the process name and PID currently bound to that port. sudo ss -tulpn is a faster modern alternative on most distributions.
It sets read, write, and execute permissions for the file owner, and read plus execute permissions for the group and everyone else. It's the standard permission set for executable scripts and directories.
Use kill -9 PID (or kill -SIGKILL PID). This sends an unblockable signal that forces the process to terminate immediately, unlike a plain kill which asks the process to shut down gracefully.