Unix HowTo: Start / Stop / Restart Network Service Command

How do I start, stop, or restart networking service under HP-UX, OpenBSD, AIX and other Unix like operating systems?

You can use the following commands as per your UNIX operating systems.

HP-UX Unix start / stop / restart networking service

# /sbin/init.d/net stop
# /sbin/init.d/net start
# /sbin/init.d/hostname start

IBM AIX Unix start / stop / restart networking service

Simply type the following command to make changes to tcp/ip
# smitty mktcpip
Start network service:
# startsrc
Stop network service:
# startsrc

OpenBSD start / stop / restart networking service

See this faq for more information on how to restart networking service:
# sh /etc/netstart pnc0

FreeBSD start / stop / restart networking service

See this post for more information on how to restart networking service:
# /etc/rc.d/netif restart

Sun/Oracle Solaris Unix start / stop / restart networking service

# svcadm restart physical

Linux: CentOS / RHEL / Red Hat / Fedora start / stop / restart networking service

See this faq for more information:
# service network stop
# service network start
# service network restart

Linux: Debian / Ubuntu server start / stop / restart networking service

See this faq for more information:
# service networking stop
# service networking start
# service networking restart


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 6 comments so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
6 comments… add one
  • Aprigio Simoes Aug 14, 2012 @ 17:07

    not, error in text.

    for HP-UX is /sbin/init.d/net and not /etc/init.d/net

  • Frank Aug 15, 2012 @ 21:48

    For Debian, this method throws an error.

  • Ajith Aug 26, 2012 @ 17:40

    For AIX, to stop the service “stopsrc”. for refresh the services “refresh

  • Fasial Ali May 16, 2013 @ 12:52

    Realy very help full these command of me Ubuntu machine
    Regards

  • waseel Nov 23, 2016 @ 6:08

    What about SCO UNIX how I can stop and start the services such as ssh and telnet.
    and how to enable telnet services

    thanks

  • Diego Mar 2, 2017 @ 19:42

    Awesome tips, thank you!

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum