Ubuntu network related query methods:
- Network card eth0 performance parameters
ethtool eht0
- Names of all network cards of the host
iwconfig
- Names of all network cards of the host
ifconfig
Ubuntu can have at least the following three setting methods:
ifconfig
Set by command- Set through the GUI that comes with Ubuntu (corresponding to the local one
/etc/NetworkManager/system-connections
) - Modify system files modify /etc/network/interface
In order to facilitate management, we often interface
add
source /etc/network/interfaces.d/*
Then interface.d is configured in the form of a file.
Configure static IP:
auto eth0
iface 192.168.1.13
netmask 255.255.255.0
gateway 192.168.1.1
automatic
auto eth0
iface eth0 inet dhcp
There are many ways to make the configuration effective, the easiest is to restart. The second is to pass /etc/init.d
. The folder is the initialization script of some services. The network-related network is one of them. The script can directly manage the corresponding service. The format is the /etc/initi.d/command OPTION
command of the service, such as bluetooth, networking, samba, ssh, etc. Wait. OPTION refers to stop, start, reload, restart, force-reload.
If you just modify the configuration, it can also be:systemctl daemon-reload
[1] /etc/init.d
Directory is famous in Linux system. It is only responsible for one thing, but it involves the whole system. It contains start/stop scripts for various services in the system, from acpid to x11-common, and its importance is evident. The init.d initialization script is called System V style initialization. It is one of the traditions of the System V system and later became the source of common features of some Unix systems. It is worth mentioning that the rc#.d directory may also be included in the /etc directory, which is also the System V style, # is the number 0 to 6, which is the runlevel of the system. It can be seen that the System V style has far-reaching influence.