Difference between revisions of "Base"

From wiki
(Created page with "{{WIP}}<syntaxhighlight lang="console"> # apt install aptitude dtrx file htop iotop jnettop sudo </syntaxhighlight>")
 
(Uppdate clock setup)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{WIP}}<syntaxhighlight lang="console">
+
== Install Base Commands ==
# apt install aptitude dtrx file htop iotop jnettop sudo
+
<syntaxhighlight lang="console">
 +
$ sudo apt install bash-completion curl dtrx file htop iotop jnettop progress sl whois
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
== Setup Clock ==
 +
To see the current configuration run the following command<syntaxhighlight lang="console">
 +
$ timedatectl                                                                                                                                                                                                                                             
 +
      Local time: Sat 2017-07-01 14:38:42 UTC
 +
  Universal time: Sat 2017-07-01 14:38:42 UTC
 +
        RTC time: Sat 2017-07-01 14:38:42
 +
      Time zone: UTC (UTC, +0000)
 +
Network time on: yes
 +
NTP synchronized: yes
 +
RTC in local TZ: no
 +
</syntaxhighlight>
 +
 +
=== NTP ===
 +
Enable [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] to keep your computer clock synchronized.
 +
First remove the old <code>ntpdate</code> package if present
 +
<syntaxhighlight lang="console">
 +
$ sudo apt purge ntpdate
 +
</syntaxhighlight>Now activate systemd NTP daemon<syntaxhighlight lang="console">
 +
$ timedatectl set-ntp true
 +
 +
</syntaxhighlight>If you get a message like <code>Failed to set ntp: The name org.freedesktop.PolicyKit1 was not provided by any .service files</code>, add <code>sudo</code> in front of the command.
 +
 +
=== Timezone ===
 +
To change the timezone, run the following command<syntaxhighlight lang="console">
 +
$ timedatectl set-timezone UTC
 +
</syntaxhighlight>If you get a message like <code>Failed to set time zone: The name org.freedesktop.PolicyKit1 was not provided by any .service files</code>, add <code>sudo</code> in front of the command.
 +
 +
To list the possible time zones, run<syntaxhighlight lang="console">
 +
$ timedatectl list-timezones                                                                                                                                                                                                                                 
 +
Africa/Abidjan
 +
Africa/Accra
 +
Africa/Addis_Ababa
 +
Africa/Algiers
 +
Africa/Asmara
 +
Africa/Bamako
 +
Africa/Bangui
 +
Africa/Banjul
 +
Africa/Bissau
 +
Africa/Blantyre
 +
...
 +
</syntaxhighlight>
 +
[[Category:Linux Server]]

Latest revision as of 14:42, 1 July 2017

Install Base Commands

$ sudo apt install bash-completion curl dtrx file htop iotop jnettop progress sl whois

Setup Clock

To see the current configuration run the following command

$ timedatectl                                                                                                                                                                                                                                               
      Local time: Sat 2017-07-01 14:38:42 UTC
  Universal time: Sat 2017-07-01 14:38:42 UTC
        RTC time: Sat 2017-07-01 14:38:42
       Time zone: UTC (UTC, +0000)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

NTP

Enable NTP to keep your computer clock synchronized. First remove the old ntpdate package if present

$ sudo apt purge ntpdate

Now activate systemd NTP daemon

$ timedatectl set-ntp true

If you get a message like Failed to set ntp: The name org.freedesktop.PolicyKit1 was not provided by any .service files, add sudo in front of the command.

Timezone

To change the timezone, run the following command

$ timedatectl set-timezone UTC

If you get a message like Failed to set time zone: The name org.freedesktop.PolicyKit1 was not provided by any .service files, add sudo in front of the command. To list the possible time zones, run

$ timedatectl list-timezones                                                                                                                                                                                                                                  
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
...