Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed the OpenBSD in my computer. I am completely new to Unix-like operating systems. I've learned how to connect to my wireless network using the following commands (even though I don't quite know what they mean):

ifconfig iwn0 nwid [network name] wpa wpapsk [password]
dhclient iwn0

I am looking for a way to connect just after the boot. Thank you.

share|improve this question
up vote 4 down vote accepted

In OpenBSD you set up networking by creating a file called /etc/hostname.iwn0 (or whatever else your interface is called).

Thus you should probably just add the following to your /etc/hostname.iwn0:

 dhcp nwid [network name] wpa wpapsk [password]
share|improve this answer
Read more in the man page – AFresh1 Oct 8 '11 at 18:27
It works! Thank you! – Bruno Calza Oct 8 '11 at 21:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.