Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to configure networking in CentOS Desktop with command line  (Read 1971 times)

0 Members and 1 Guest are viewing this topic.

akhilt

  • Guest
How to configure networking in CentOS Desktop with command line

If you want to configure networking in CentOS Desktop by using command line utilities, you should be aware that networking on CentOS Desktop is by default managed by a daemon with GUI interface, which is called NetworkManager. This means that whenever you want to change network configuration, you are supposed to do so via NetworkManager. Any change made otherwise will be lost or overwritten by NetworkManager later.

So the first step to configuring networking using command line on CentOS Desktop is to disable NetworkManager, and enable network service.

To disable NetworkManager permanently on CentOS, do the following.
Code: [Select]
$ sudo service NetworkManager stop
$ sudo chkconfig NetworkManager off


Then, activate network service instead.

Code: [Select]
$ sudo service network start
$ sudo chkconfig network on

Once NetworkManager is disabled, you can now configure networking simply by editing files in /etc/sysconfig/network-script, as described in the post.

When you are done with configuring all existing interfaces, restart network to activate the change.

Code: [Select]
$ sudo /etc/init.d/network restart