How to create an alias for linux server name?
- by Radek
The openSUSE server name is 'darkhelmet'. I want to create an alias 'dh' for it. So I can also type 'ssh dh' and 'http://dh' would work too.
What file/files and where do I have to edit to make this happen?
Extract from /etc/hosts from darkhelmet
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 darkhelmet.edumate darkhelmet
10.0.0.22 db2workgroup db2workgroup
[root][skroob] nslookup darkhelmet
Server: 10.0.0.10
Address: 10.0.0.10#53
Name: darkhelmet.edumate
Address: 10.0.0.22