Useful commands: Difference between revisions

From SoftwareGuy
Jump to navigation Jump to search
Mark (talk | contribs)
No edit summary
Mark (talk | contribs)
Line 5: Line 5:
===Setting network interface parameters with nmcli===
===Setting network interface parameters with nmcli===


<code>sudo nmcli con edit eno12399
<code> sudo nmcli con edit eno12399
 
nmcli> set ipv4.addresses 192.168.2.6/24,192.168.3.6/24
nmcli> set ipv4.addresses 192.168.2.6/24,192.168.3.6/24
nmcli> print ipv4
nmcli> print ipv4
ipv4.method:                            auto
ipv4.method:                            auto
ipv4.dns:                               --
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-search:                        --
ipv4.dns-options:                       ""
ipv4.dns-options:                       ""
ipv4.dns-priority:                      0
ipv4.dns-priority:                      0
ipv4.addresses:                         192.168.2.6/24,
ipv4.addresses:                         192.168.2.6/24,
192.168.3.6/24
192.168.3.6/24
nmcli> save
nmcli> save</code>
</code>

Revision as of 15:10, 28 March 2023

Setting a hostname

hostnamectl set-hostname "ClusterTest1"

Setting network interface parameters with nmcli

sudo nmcli con edit eno12399

nmcli> set ipv4.addresses 192.168.2.6/24,192.168.3.6/24
nmcli> print ipv4
ipv4.method:                            auto
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-options:                       ""
ipv4.dns-priority:                      0
ipv4.addresses:                         192.168.2.6/24,
192.168.3.6/24
nmcli> save