Linux/General Server Management: Difference between revisions

From Dev Wiki
Jump to navigation Jump to search
(Create page)
 
(Add hostname values)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:


== View Current System Timezone ==
== 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
  cat /etc/timezone




== View Current System Date ==
=== View Current System Date ===
  date
  date






== Set System Timezone ==
=== Set System Timezone ===
  sudo timedatectl set-timezone <timezone>
  sudo timedatectl set-timezone <timezone>


For example:
For example:
  sudo timedatectl set-timezone America/New_York
  sudo timedatectl set-timezone America/New_York

Latest revision as of 01:23, 7 May 2023

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