This post will guide you how to start or restart network service on the latest Ubuntu 18.04 or Debian linux system. How do I start, stop or restart Network service from the command line on your Ubuntu Linux system.
If you are working on a Ubuntu Linux system, and you may be need to set IP address for a given enternet interface or you need to change network settings by modifying networking configuration file called interfaces
located in the /etc/network
directory using your vim text editor. or you can use cat command to dispaly the content of the current networking configuration file, type:
$ sudo vim /etc/network/interfaces
or
$ cat /etc/network/interfaces
Outputs:
devops@devops:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet dhcp
If your network service daemon is stopped, and you may be need to start it by using the following command:
$ sudo systemctl start networking.service
or
$ sudo /etc/init.d/networking start
If you wish to stop a network service in your Ubuntu or Debian Linux, and you can type the following comand:
$ sudo systemctl stop networking.service
or
$ sudo /etc/init.d/networking stop
If you modified networking configuration in your Ubuntu system, and you need to restart its service by using the following command:
$ sudo systemctl restart networking.service
or
$ sudo /etc/init.d/networking restart
If you need to check the current status of networking service in your Ubuntu system, and you can issue the following command:
$ sudo systemctl status networking.service
Or
$ sudo /etc/init.d/networking status
Outputs:
devops@devops:~$ sudo systemctl status networking.service
networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; disabled; vendor preset: enabled)
Active: active (exited) since Tue 2019-10-08 02:59:03 EDT; 18min ago
Docs: man:interfaces(5)
Main PID: 1158 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 1121)
CGroup: /system.slice/networking.service
Oct 08 02:58:59 devops systemd[1]: Starting Raise network interfaces...
Oct 08 02:59:03 devops systemd[1]: Started Raise network interfaces.
If you want to enable your network service at system boot on your Ubuntu system, and you can run the following command:
$ sudo systemctl enable networking.service
Outputs:
devops@devops:~$ sudo systemctl enable networking.service
Synchronizing state of networking.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable networking
If you want to diable network service at system boot, just using the following command:
$ sudo systemctl disable networking.service
You should know that how to start/stop/restart/enable/disalbe network service in your Ubuntu or Debian L Linux system.
The post How To start/Stop/Restart Network Service on Ubuntu or Debian Linux first appeared on RSSFeedsCloud.
Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…
Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…
At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…
I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…
Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…
Now I want to share the DNS server installation process on your Ubuntu 20.04 server.…