Linux/General Server Management

From Dev Wiki
Jump to navigation Jump to search

HostName Management

The HostName is the value that displays such as when connecting via an ssh terminal.

Display Current HostName

hostname

To view additional information, use:

hostnamectl

Change HostName

sudo hostnamectl set-hostname <desired_new_name>


Datetime Management

These commands control what datetime your system uses.

View Current System Timezone

cat /etc/timezone


View Current System Date

date


Set System Timezone

sudo timedatectl set-timezone <timezone>

For example:

sudo timedatectl set-timezone America/New_York