1) Use ifconfig command as follows:
ifconfig interface inet IP
Example(s):
ifconfig lnc0 inet 202.54.1.22
Note lnc0 is Ethernet interface name can be Obtained using ifconfig -a command.
2) To setup up ip permanently open file /etc/rc.conf ; add/modify network entries:
vi /etc/rc.conf
And setup values as follows:
hostname="fbsdx.test.com"
ifconfig_lnc0="inet 192.168.0.6 netmask 255.255.255.0"
Note ifconfig_lnc0 is Ethernet interface name can be Obtained using ifconfig -a command.
3) Again re-run /etc/netstart script.
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins

- My 10 UNIX Command Line Mistakes
- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
Facebook it - Tweet it - Print it -
We're here to help you make the most of sysadmin work. So, subscribe!

{ 7 comments… read them below or add one }
Thanks for this tip. It was very helpful
Could you please set up an .exe file to do the above procedure
I think making a .exe file with the above commands will make the job easier for repeatedly changing ip addresses
An exe file, do you have any idea about what you are saying, exe files is a windows thing.
.exe for bsd!? thanks for the good laugh ; )
lmao, maybe he meant a .bat file not .exe!
The .bat file is from windows too ;)
Friggen windows nerds with your exe and bat files. However can you create a vbs script perhaps. I like the idea of changing the IP address easily from script. vbs would be nice.