Skip to content

Instantly share code, notes, and snippets.

@mano8
Last active September 9, 2022 11:56
Show Gist options
  • Save mano8/7107f43fd0545769c7efcae73d24076b to your computer and use it in GitHub Desktop.
Save mano8/7107f43fd0545769c7efcae73d24076b to your computer and use it in GitHub Desktop.

Packages

To see if there is any configuration files or manual pages belonging to Apache2 package:
# whereis apache2

Networking

Link to ip commands cheat sheet, pdf document.

Get IP Addresses and property information:
$ ip addr

Get IP Addresses and property information from wlp5s0 interface:
$ ip addr show dev wlp5s0

Show active ip adress from interface : # ip addr show enp3s0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'

Get the state of all network interfaces:
$ ip link

Get the state of wlp5s0 network interface:
$ ip link show dev wlp5s0

Set wlp5s0 network interface UP:
$ ip link set wlp5s0 up

Set wlp5s0 network interface DOWN:
$ ip link set wlp5s0 down

Disable wifi:
$ nmcli radio wifi off

Enable wifi:
$ nmcli radio wifi on

Get active wirless interfaces:
$ iwconfig

Scan available wifi networks:
$ sudo iwlist wlp5s0 scan

Get all available wifi networks:
$ sudo iwlist wlp5s0 scan | grep ESSID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment