You are not logged in.

#1 2021-07-02 12:16:44

ohgodmanyo
Member
Registered: 2021-07-02
Posts: 14

Help with the network part on the installation guide

Hello, I've been looking into installing arch and now since I've installed it a few times on a virtual machine successully, I think that I can do it on my real computer. There is one thing that I am quite confused about though.

https://imgur.com/a/PIzhhYC

Right here it says I need to edit the host file, and I have no clue what myhostname and localdomain is.

I would really appreciate it if someone could walk me through the following:

What do I put for myhostname?
What do I put for localdomain?
What is the purpose of this?
Is doing this recommended?
Is doing this optional?

Thank you.

Offline

#2 2021-07-02 12:48:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Help with the network part on the installation guide

ohgodmanyo wrote:

What do I put for myhostname?

This is an arbitrary name of your choosing.  It should be the same as what you put in /etc/hostname.

ohgodmanyo wrote:

What do I put for localdomain?

You can just leave that as literally "localdomain".  In most personal / home computer systems this really doesn't matter at all.  If you were running a public server, localdomain would be the actual domain name that you purchased (e.g., mycoolwebsite.com).  But for everyone else this doesn't matter and "localdomain" is fine.

ohgodmanyo wrote:

What is the purpose of this? Is doing this recommended? Is doing this optional?

There are a couple purposes, but many of the most important ones apply to either internet-facing servers, or hubs of local networks.  For many common "users" these are not so important.  However the first two lines can be used by some common programs.  All these lines associate a name with an IP address, so with the /etc/hosts file properly constructed a locally running program can connect to "localhost" and be properly directed to the local IP addresses.

You can actually uses /etc/hosts to do all sorts of other domain name redirecting or host blocking.  For example, you can get a list of domain names known to be spam / advertising sources, and put  all those names in /etc/hosts after a null IP (0.0.0.0), so any request from your browser to those domains goes nowhere.  This is a minimalist but very powerful "ad blocker".

But again, this information is just provided for context - if you are asking these questions, you are almost certainly not running an internet-facing server or local area network, so just use first two lines in the file from the wiki, and the third with whatever you put in /etc/hostname in place of "myhostname" and leave "localdomain" as it is.

Last edited by Trilby (2021-07-02 12:48:36)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2021-07-02 14:52:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Help with the network part on the installation guide

To add to what Trilby said, the hostname, while arbitrary,  should be unique on any given LAN.  Among other things, it is used by local domain name servers to tell allow computers on your LAN to find each other.  For example, you may want to call the printer in the den, den_printer.   This will permit you to do things like ping den_printer.  Many of us like to give pet names to our systems.  This one is odin,  My other one is turing.  I have a VM named morpheous.  The system controlling the wave form generator, power supply and oscilloscope across the room is labbench.   The Raspberry pi controlling my drip irrigation system, fountain pump and low voltage outside lighting is called irrigation


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB