Can I change the hostname on a SailfishOS Sony Xperia X?
Basically, I like the standard hostname 'Sailfish' quite well, but a own name would be also very nice. :)
Well, in principle it is certainly possible to change the hostname, but the real question here is whether it is recommended or at least tolerated, without endangering the smooth running of the next update or negatively interfere on other kind of internal things... I've also noticed that the environment variable $HOSTNAME
doesn't seem to be set.
Tx.
stupid question, whats the sailfish hostname, whats mine?
DarkTuring ( 2017-12-28 03:14:23 +0200 )editalso more accurately what is a hostname, whats its use in Linux?
DarkTuring ( 2017-12-28 03:15:11 +0200 )editHi @DarkTuring, first of all, if you don't know something, there are no stupid questions. On the other hand, nowadays there are - thanks to the Internet - enough options for those eager to find out more about almost everything... :)
Now to your questions: The hostname is simply expressed let's say a human readable name of a network device that is directly linked to its IP address. This capability is not Linux-specific, but a cross-platform and even cross-protocol standard in network environments.
My SX X has hostname 'Sailfish' assigned and I suppose it will be the same for all SailfishOS devices around. When I do activate the WLAN connection, my phone is registered on my router/access point as 'Sailfish' with a specific IP address, let's say 123.4.5.6. If now a second SailfishOS device is active on the same network, then this second one will also get 'Sailfish' as his hostname (well, depending on the implementation, an extension is automatically appended to the second device with an identical name, e. g. Sailfish-1).
In order to be able to distinguish the single devices easily and unambiguously at any time, a dedicated host name per device can be assigned, e. g. 'MyPhone' and 'TheOtherPhone'. Another benefit is that you can contact the devices within local network by hostname and don't have first to find out which IP address it has.
Yo can find further information on the net, e. g. as a starting point at https://en.wikipedia.org/wiki/Hostname
JMLatJolla ( 2017-12-28 14:32:27 +0200 )edit