Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have most of my hardware the way I want, but am trying to set each system up where I can reliably know which computer is which over my network. I can also find and ping each computer without issue.
I am connecting several computers and a couple cell phones. Each computer runs Porteus, which come from Slackware. A few hook in via a Cat5e, and a couple via WiFi. I expect the IPs to change occasionally due to rebooting and then having to hit DHCP again. Would the hostname be what I need to set here? ...and how would I set it permanently?
Once configured, I intend to start grabbing files off of each computer and syncing them between each machine, as well as to share internet.
Create a file /etc/hostname on each computer and put your desired hostname in there. It will then be set each time you boot. You probably want to add the other computers' hostnames to /etc/hosts as well.
The /etc/hosts file will only work if the devices have static IP addresses. This can be configured on each computer or you can through address reservation via your router's or DHCP server's configuration. Otherwise you need a local DNS service like dnsmasq.
If you transfer files via scp/sftp you still need to use static IP addresses but you can create something similar to a host file via the ~/.ssh/config file
I made me an /etc/hostname file, though I haven't found anything that tells me how to format it under Porteus. I gather it depends on the distro as to what defines the system name. There has to be something local setting the name or I'd expect to see a list of Sys1, Sys2, etc. and not porteus, porteus, etc.
It also doesn't help that I am rusty to Linux 2.2.24, and to Linux networking.
There are generally 4 ways a computer looks up a resource. Generally it looks to hosts first but that can be set to use other lookups first.
Remember that hosts file can be an issue if you forget about it.
To get really wild you can make a static arp entry and then make a hosts no matter what your dhcp does but again that can really make an issue if you forget.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.