≡ Menu

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

Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:



{ 5 comments… add one }
  • Aprigio Simoes August 14, 2012, 5:07 pm

    not, error in text.

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

  • Frank August 15, 2012, 9:48 pm

    For Debian, this method throws an error.

  • Ajith August 26, 2012, 5:40 pm

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

  • Fasial Ali May 16, 2013, 12:52 pm

    Realy very help full these command of me Ubuntu machine
    Regards

  • waseel November 23, 2016, 6:08 am

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

    thanks

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: , , , , , , , , , , , , ,