{"id":497,"date":"2011-03-06T20:58:56","date_gmt":"2011-03-06T12:58:56","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=497"},"modified":"2023-04-28T09:50:38","modified_gmt":"2023-04-28T09:50:38","slug":"how-to-restart-linux-network-service","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-restart-linux-network-service\/","title":{"rendered":"How to Restart Linux Network Service"},"content":{"rendered":"<p>Restarting the network service is sometimes necessary when you make changes to your system&#8217;s network configuration or if you are troubleshooting network-related issues. The method for restarting the network service depends on the Linux distribution and the network manager in use.<\/p>\n<p>In this short guide, we will show you how to restart the network service on different Linux distributions.<\/p>\n<h2>Restart Network Service on Debian-based Systems (e.g., Ubuntu)<\/h2>\n<p>For Debian-based systems like Ubuntu, you can use the systemd or the NetworkManager service to restart the network service. Open a terminal and execute one of the following commands:<\/p>\n<p>Using systemd:<\/p>\n<pre>\r\nsudo systemctl restart networking\r\n<\/pre>\n<p>Using NetworkManager:<\/p>\n<pre>\r\nsudo systemctl restart NetworkManager\r\n<\/pre>\n<h2>Restart Network Service on Red Hat-based Systems (e.g., CentOS, RHEL)<\/h2>\n<p>For Red Hat-based systems like CentOS and RHEL, you can use the systemd or the NetworkManager service to restart the network service. Open a terminal and execute one of the following commands:<\/p>\n<p>Using systemd:<\/p>\n<pre>\r\nsudo systemctl restart network\r\n<\/pre>\n<p>Using NetworkManager:<\/p>\n<pre>\r\nsudo systemctl restart NetworkManager\r\n<\/pre>\n<h2>Restart Network Service on Fedora<\/h2>\n<p>On Fedora, the NetworkManager service is used to manage network connections. To restart the network service, open a terminal and run:<\/p>\n<pre>\r\nsudo systemctl restart NetworkManager\r\n<\/pre>\n<h2>Previous Versions<\/h2>\n<p>On some older Linux distributions or those that still use the legacy System V init system you can use the command &#8220;service network restart&#8221;. This command is used to restart the network service and apply new network configurations or troubleshoot network-related issues.<\/p>\n<p>For Red Hat-based systems like CentOS or RHEL, you can use this command to restart the network service:<\/p>\n<pre>\r\nsudo service network restart\r\n<\/pre>\n<p>However, keep in mind that many modern Linux distributions, such as CentOS 7 and later, RHEL 7 and later, Ubuntu 16.04 and later, and Fedora, have switched to using the systemd init system. In such cases, it is recommended to use the systemctl command instead, as shown in the previous response.<\/p>\n<p>It is essential to know which init system your Linux distribution is using before choosing the appropriate command to restart the network service.<\/p>\n<h3>Commands and Their Functions:<\/h3>\n<ul>\n<li><span class=\"fw-bold\">sudo systemctl restart networking<\/span> &#8211; Restarts the network service on Debian-based systems using `systemd`.<\/li>\n<li><span class=\"fw-bold\">sudo systemctl restart NetworkManager<\/span> &#8211; Restarts the network service on Debian-based systems and Fedora using `NetworkManager`.<\/li>\n<li><span class=\"fw-bold\">sudo systemctl restart network<\/span> &#8211; Restarts the network service on Red Hat-based systems using `systemd`.<\/li>\n<\/ul>\n<h3>Conclusion<\/h3>\n<p>In this guide, we have demonstrated how to restart the network service on different Linux distributions, including Debian-based systems (e.g., Ubuntu), Red Hat-based systems (e.g., CentOS, RHEL), and Fedora. By restarting the network service, you can apply new network configurations or troubleshoot network-related issues.<\/p>\n<p>Please feel free to leave comments and suggest improvements to this guide. Your feedback is valuable and helps us improve our content for our audience.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Restarting the network service is sometimes necessary when you make changes to your system&#8217;s network configuration or if you are troubleshooting network-related issues. The method for restarting the network service&#8230;<\/p>\n","protected":false},"author":6,"featured_media":323,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[996],"tags":[1536,1979],"class_list":["post-497","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux","tag-network-restart"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=497"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/497\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/323"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}