Useful commands: Difference between revisions

From SoftwareGuy
Jump to navigation Jump to search
Mark (talk | contribs)
Created page with "Setting a hostname <code>hostnamectl set-hostname "ClusterTest1"</code> Setting network interface parameters with nmcli <code>sudo nmcli con edit eno12399</code> <code>nmcli> set</code> <code>ipv4.addresses 192.168.2.6/24,192.168.3.6/24</code> <code>nmcli> print ipv4</code> <code>ipv4.method:                            auto</code> <code>ipv4.dns:                               --</code> <code>ipv4.dns-search:                ..."
 
Mark (talk | contribs)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Setting a hostname  
===Setting a hostname ===


<code>hostnamectl set-hostname "ClusterTest1"</code>
<code>hostnamectl set-hostname "ClusterTest1"</code>


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
<code>nmcli> set</code> <code>ipv4.addresses 192.168.2.6/24,192.168.3.6/24</code>
nmcli> set connection.autoconnect yes
 
nmcli> print ipv4
<code>nmcli> print ipv4</code>
ipv4.method:                            auto
 
ipv4.dns:                               --
<code>ipv4.method:                            auto</code>
ipv4.dns-search:                        --
 
ipv4.dns-options:                       ""
<code>ipv4.dns:                               --</code>
ipv4.dns-priority:                      0
 
ipv4.addresses:                         192.168.2.6/24,
<code>ipv4.dns-search:                        --</code>
192.168.3.6/24
 
nmcli> save
<code>ipv4.dns-options:                       ""</code>
The configuration files are stored in <code>/etc/NetworkManager/system-connections/eno12399.nmconnection</code>.
 
<code>ipv4.dns-priority:                      0</code>
 
<code>ipv4.addresses:                         192.168.2.6/24,</code>
 
<code>192.168.3.6/24</code>
 
<code>nmcli> save</code>

Latest revision as of 15:42, 28 March 2023

Setting a hostname[edit | edit source]

hostnamectl set-hostname "ClusterTest1"

Setting network interface parameters with nmcli[edit | edit source]

sudo nmcli con edit eno12399
nmcli> set ipv4.addresses 192.168.2.6/24,192.168.3.6/24
nmcli> set connection.autoconnect yes
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

The configuration files are stored in /etc/NetworkManager/system-connections/eno12399.nmconnection.