How To: Find the hostname.

The hostname is, for many of you who will be reading this, the same as your username. This is not always true.

Why is it important? Well, if I want to connect to a box on my network, I use its hostname. For example:

ssh kgiii@kgiii-lmde.local

That means I don’t need to know the IP address of the box, I merely need to know the hostname. That, as I said, is usually your username. On the off-chance that it isn’t, it’s easy to find.

cat /proc/sys/kernel/hostname

And there you go.

Smash a Button
[Total: 0 Average: 0]
About Me: I'm just some retired dude with a little bit more free time on my hands. If you want to support the site, why not help yourself out too by ordering some inexpensive web hosting so that you can start your own site?

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.