Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the ways to modify IP through the linux command line

Shulou Source: shulou.com Published: 2022-06-01 18:00:41 11月15日 Update

This article mainly explains "what is the way to modify IP through the linux command line". The content in 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 "what are the ways to modify IP through the linux command line".

This paper introduces the method of modifying IP through the linux command line. Modifying IP through the linux command line can be achieved in the following two ways.

Method 1:

Ifconfig eth0 192.168.1.18 netmask 255.255.255.0

Description: this method can make the change take effect immediately, and it will return to the original IP after restart.

Method 2:

Vi / etc/sysconfig/network-scripts/ifcfg-eth0

Note: this method takes effect after restart, and it is *.

If you want to change it immediately and * * takes effect, you can only use the above two methods at the same time.

Thank you for your reading, the above is the content of "modifying IP through the linux command line". After the study of this article, I believe you have a deeper understanding of what you have to modify IP through the linux command line, 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!

Tags: Ways commands learning content can make can pass at the same time that is ideas situations articles methods more knowledge knowledge points articles follow questions practice push Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Redmi Docker NVidia MySQL