How to restart/stop/start networking in FreeBSD

FreeBSD daemonFreeBSD® is an advanced operating system for x86 compatible (including Pentium® and Athlon™), amd64 compatible (including Opteron™, Athlon™64, and EM64T), UltraSPARC®, IA-64, PC-98 and ARM architectures. It is derived from BSD, the version of UNIX® developed at the University of California, Berkeley. It is developed and maintained by a large team of individuals. Additional platforms are in various stages of development.

FreeBSD 5.x/6.x includes netif shell script located in /etc/rc.d/ directory that is meant to restart networking service without system restart. Besides, /etc/rc.d/ contains scripts to start/stop/restart other services such as ssh or squid.

To start FreeBSD networking:

/etc/rc.d/netif start

To stop networking:

/etc/rc.d/netif stop

To restart networking:

/etc/rc.d/netif restart

To restart, start or stop routing service you can do:

/etc/rc.d/routing restart

FreeBSD 4.x and prior versions

To start networking you have to copy shell script as follows:

1) Copy file /usr/share/examples/etc/netstat to /etc dirctory

cp /usr/share/examples/etc/netstart /etc/network

2) And execute the script:

. /etc/network


sh /etc/network

That script will do all necessary work for you (start network, routing, firewall and etc.).


Stefan Durand

My name is Stefan, I'm the admin of LinuxScrew. I am a full-time Linux/Unix sysadmin, a hobby Python programmer, and a part-time blogger. I post useful guides, tips, and tutorials on common Linux and Programming issues. Feel free to reach out in the comment section.

Leave a Reply

Your email address will not be published. Required fields are marked *