Skip to main content




sudo hostnamectl set-hostname vm7.orgDomain


hostnamectl status
# or
cat /etc/hostname

HTTP protocol

Method role in RESTful APIs

  • POST (sometimes PUT) - Create a new resource using the information sent with the request.
  • GET - Read an existing resource without modifying it.
  • PUT or PATCH (sometimes POST) - Update a resource using the data sent.
  • DELETE - Delete a resource.

Sending arguments

GET method

Sent as a query string after ? in the url.

POST/PUT methods

Stored as key-value pairs in the body (not visible in the url).

{ "key": "value" }


Add a route temporarily (until reboot)

ip route add via

Add an IP address to an interface temporarily (until reboot)

sudo ip address add dev eth0

Bring interfaces up and down

sudo ip link set eth0 up
sudo ip link set eth0 down

Delete a route temporarily (until reboot)

sudo ip route delete via
# or
sudo ip route delete

Show ARP cache (MAC addresses)

ip -c neighbor show

Show information for all interfaces

ip -c link show

Show ip addresses allocated to interfaces

ip -c address show

Show public ip address


Show statistics of an interface

ip -c -h -s link show eth0
  • Options c and h add color and human-readable values to output.


Add route temporarily (until reboot)

sudo route add -net netmask gw
# Add default gateway.
sudo route add default gw

Delete route temporarily (until reboot)

sudo route del -net netmask
# Delete default gateway.
sudo route del default

Show routing table



Useful options

-4IPv4 sockets only.
-aListening and non-listening sockets (established for TCP).
-lListening sockets only.
-mSocket memory usage.
-nDon't resolve numeric adresses/ports.
-oOptions (i. e. state established).
-pProcess using socket.
-tTCP sockets.
-uUDP sockets.
-xUnix domain sockets.
-ZProcess and security context (SELinux).


See route to target host.

traceroute targetHost

To bypass firewalls that block ICMP traffic try options:

# or

Note: These commands were tested on RHEL 7 unless otherwise specified.