πŸ“œLinux Scroll

This page will feature Linux cheatsheets for quick reference when needed for various tasks. It will not include detailed information.

Knowing about a Command

man [COMMAND NAME]
whatis [COMMAND NAME]

Check your Current IP

ifconfig #eth0/wlan0
ip a s #eth0/wlan0

# Private IP
ip -br -c a

# Public IP
curl ip.me -- public

List/Check TCP Connections

# This command lists all TCP connections and listening ports along with their numerical IP addresses and port numbers, and also shows the process ID and name associated with each connection.

netstat -antp
netstat -ano [does not show process name]

2>/dev/null

When you use 2>/dev/null, any error messages generated by the command are sent to /dev/null, effectively hiding or ignoring them.

  • 2> redirects the standard error output (which is represented by file descriptor 2).

  • /dev/null is a special file that discards any data written to it (essentially a "black hole").

Last updated