Linux: General System Administration

Common tasks that are required to maintain a Linux system.

Set the Hostname

Run the following commands for the proper Linux distribution.

Debian & Ubuntu

echo “thename” > /etc/hostname
hostname -F /etc/hostname

*Replace thename with the desired hostname

CentOS

echo “HOSTNAME=thename” >> /etc/sysconfig/network
hostname “thename”

*Replace thename with the desired hostname

Change Timezone

By default FST Servers VPSs are set to Central Standard Time. In order to change the timezone run the following commands for the proper Linux distribution.

Debian & Ubuntu

Enter the following command and answer the prompted questions.

dpkg-reconfigure tzdata

CentOS

Enter the following command and answer the prompted questions.

redhat-config-date

Edit /etc/hosts (Hostnames’ IP Association)

Enter the following command to load the /etc/hosts file in Nano.

nano /etc/hosts

Enter your IP Address and the domain/hostname you’d like it to be associated with.

Example:

74.125.93.105    google.com

CTRL + X to close Nano.