Blog

Viewing posts for the category UNIX

Low bandwidth tricks

A few tips and tricks I use to achieve tasks in low bandwidth setups.

[VPN] How to use wireguard VPN to connect back home

Scenario

Be able to connect to a home device behind nat router internet box.

[COMMAND LINE] Processes

Display currently running processes.

ps
ps -ef
ps aux
ps -ef | grep firefox # only information about a specific process

List running processes and resources consumption

top

Find program using file

lsof path/to/file

Find files used by program

lsof -c <program_name>
lsof -p <PID>

Which program is listening on port

lsof -i :<port>

Terminate a process

kill <PID> # PID Program IDentifier can be obtained from ps
killall <program_name>

[COMMAND LINE BASICS] FILES, NAVIGATION

When using the command line it’s useful to know how to move around and act on files.