Ubuntu-L4-Lieutenant

Debugging & Inspection

strace — Trace system calls of a process

Traces system calls made by a process. Essential for low-level debugging.

strace ls

lsof — List open files and network connections

Lists open files and network sockets. Used to find port and file locks.

lsof -i :8080

watch -n — Re-run a command at intervals

Executes a command repeatedly at intervals. Useful for live system monitoring.

watch -n 2 free -h

time — Measure command execution time

Measures real, user, and system execution time. Used for performance profiling.

time python script.py

Networking & Remote Access

ssh — Secure remote login

Securely logs into a remote system. Primary tool for server access.

scp — Copy files over SSH

Copies files securely over SSH. Simple but less efficient than rsync.

rsync — Fast file synchronization

Synchronizes files efficiently. Transfers only changed data.

nc (netcat) — Network testing and debugging

Reads and writes raw network data. Used for port testing and debugging.


Permissions & Security

getfacl — View Access Control Lists

Displays Access Control Lists. Shows fine-grained permissions.

setfacl — Set Access Control Lists

Modifies Access Control Lists. Adds user-specific permissions.

id — Show user/group IDs

Displays user and group IDs. Used to verify privilege context.


Filesystem & Storage

mountpoint — Check if directory is mounted

Checks if a directory is a mount point. Useful in scripts and safety checks.

sync — Flush write buffers

Flushes write buffers to disk. Prevents data loss.

fallocate — Preallocate file space

Preallocates space for a file. Common in storage testing.


Logs & Monitoring

journalctl — Query system logs

journalctl Queries systemd logs. Primary log inspection tool.

dmesg — Kernel ring buffer messages

Displays kernel messages. Used for hardware debugging.

vmstat — Memory statistics

Reports memory and CPU stats. Useful for performance monitoring.

iostat — Disk I/O stats (install first)

Shows disk I/O statistics. Helps detect bottlenecks.


Shell Power Tools

xclip — Clipboard access from terminal

Copies terminal output to clipboard. Bridges CLI and GUI workflows.

column — Align output into columns

Aligns text into columns. Improves readability.

select — Bash menu creation

Creates interactive shell menus. Useful for scripts.


User & System Control

loginctl — Manage user sessions

Manages user sessions. Used in systemd environments.

ulimit — Control resource limits

Sets resource usage limits. Prevents resource exhaustion.

hostnamectl — Manage system hostname

Views or sets system hostname. Updates system identity.

poweroff — Shut down system

Shuts down the system safely. Requires root access.


Last updated