In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the usage of the Linux basic command ifcfg". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the usage of the Linux basic command ifcfg".
Ifcfg
Ifcfg is a simple script to replace the iconfig command that sets the ip address of the network interface.
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
Ifcfg [device] [cmd] [address]
Device is a network card device, it may have an alias. Cmd can be add, delete, stop. Address is the ip address.
2. List of options
None
3. Examples
1) add ip address
[root@localhost ~] # ifcfg eth0 add 192.168.0.250 Universe 24 / / add address 250
Forwarding is ON or its state is unknown (4). OK, No RDISC.
[root@localhost ~] # ifconfig / / View network information
Eth0 Link encap:Ethernet HWaddr 08:00:27:14:33:57
Inet addr:192.168.0.250 Bcast:192.168.0.255 Mask:255.255.255.0
Inet6 addr: fe80::a00:27ff:fe14:3357/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:107276 errors:0 dropped:0 overruns:0 frame:0
TX packets:72250 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:1000
RX bytes:83580745 (79.7MiB) TX bytes:5842176 (5.5MiB)
2) Delete ip address
[root@localhost ~] # ifcfg eth0 delete 192.168.0.250 Universe 24 / / Delete Nic address
Forwarding is ON or its state is unknown (4). OK, No RDISC.
[root@localhost ~] # ifconfig / / View the Nic information. The ip address has been deleted
Eth0 Link encap:Ethernet HWaddr 08:00:27:14:33:57
Inet6 addr: fe80::a00:27ff:fe14:3357/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:107276 errors:0 dropped:0 overruns:0 frame:0
TX packets:72251 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:1000
RX bytes:83580745 (79.7MiB) TX bytes:5842218 (5.5MiB)
Thank you for your reading, the above is the content of "the usage of the Linux basic command ifcfg". After the study of this article, I believe you have a deeper understanding of the usage of the Linux basic command ifcfg, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.