Home / Blog /

FreeBSD: What's My IP Address? (How To Find Out)

  • 0
  • 1 mins

Need to know your IP address in FreeBSD?

It's very easy to find out.

FreeBSD: What's my IP?

Assuming your network interface is em0, to find out your IP address in FreeBSD just use this command:


(see man page)

Look under em0 (or whatever interface you're using) and you'll see your network IP address.

How do I get my IP address and nothing else in FreeBSD?

Let's say you only want to output your IP address and no other information (e.g. for a DWM status bar or something), use this command:

ifconfig wlan0 | grep 'inet' | awk -F ' ' '{ print $2 }'

In this case, I've used the wlan0 interface (wifi) but you could replace this with em0 or whatever suits you. This will output your IP (e.g. to shell and nothing else.

Redpill your friends:
Donovan Nagel
Applied Linguistics graduate, translator and entrepreneur who uses FreeBSD and OpenBSD exclusively for work.
Subscribe to my YouTube channel.

Got something to share?

Comment Policy: This is a free-speech zone but cuntery isn't tolerated. Also no "Linux can do that" flame wars.
All comments are moderated before being published.