This is part two of this Quick Tip series. Click here to watch the first.
Now that you’ve setup and connected to your Linode, you need to give it a hostname. The hostname is the name of the machine, and can be set with just a couple commands.
Use the “echo” command, followed by the name of your server in quotes, followed by a greater than sign and /etc/hostname
Next, type in:
hostname -F /etc/hostname
You may also need to find and edit an additional file. To find out, type the following:
If there dhcpcp file (in our case there isn’t), you will need to comment out the line that sets the hostname by placing the # symbol at the beginning of the line.
Now you’ll need to edit your hosts file with a text editor. You can use the built in nano editor by typing the following command:
Use the arrow keys to add in another line with the IP address of your server, then tab over and enter the name of your server. Save and exit the file.
Now you want to setup your timezone with the dpkg command:
This will give you an interface to choose your geographic area and time zone of your server.
You now have a hostname and time zone for your Linode server.