cheatsheet-linux
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cheatsheet-linux [2025/10/25 18:06] – created - external edit 127.0.0.1cheatsheet-linux [2025/10/26 20:11] (current) sjoerd
Line 254: Line 254:
 hostname hostname
 hostname -s hostname -s
 +</code>
 +\\
 +> Show and renew the IP address
 +<code bash>
 +# These commands work on UbuntuServer 18.04-LTS deployed on Azure
 +# Show lists of network cards
 +sjoerd@jumpbox:~$ networkctl list
 +IDX LINK TYPE     OPERATIONAL SETUP
 +  1 lo   loopback carrier     unmanaged
 +  2 eth0 ether    routable    configured
 +
 +2 links listed.
 +# Renew IP address
 +sjoerd@jumpbox:~$ sudo networkctl renew eth0
 +[sudo] password for sjoerd:
 +# Show IP address
 +sjoerd@jumpbox:~$ networkctl status
 +● Interfaces: 2, 1
 +         State: routable
 +  Online state: online
 +       Address: 10.10.10.5 on eth0
 +       Gateway: 10.10.10.1 on eth0
 +           DNS: 10.10.0.10
 +Search Domains: reddog.microsoft.com
 </code> </code>
 \\ \\
cheatsheet-linux.txt · Last modified: by sjoerd