Difference between revisions of "Base"

From wiki
(Add progress to the list of base commands)
(sudo)
Line 1: Line 1:
 
== Install Base Commands ==
 
== Install Base Commands ==
 
<syntaxhighlight lang="console">
 
<syntaxhighlight lang="console">
# apt install aptitude bash-completion curl dtrx file htop iotop jnettop progress sl sudo whois
+
$ sudo apt install aptitude bash-completion curl dtrx file htop iotop jnettop progress sl sudo whois
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 7: Line 7:
 
Enable [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] to keep your server clock synchronized.
 
Enable [https://en.wikipedia.org/wiki/Network_Time_Protocol NTP] to keep your server clock synchronized.
 
<syntaxhighlight lang="console">
 
<syntaxhighlight lang="console">
# apt purge ntpdate
+
$ sudo apt purge ntpdate
# systemctl enable systemd-timesyncd.service
+
$ sudo systemctl enable systemd-timesyncd.service
 
Created symlink from /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service to /lib/systemd/system/systemd-timesyncd.service.
 
Created symlink from /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service to /lib/systemd/system/systemd-timesyncd.service.
# systemctl start systemd-timesyncd.service
+
$ sudo systemctl start systemd-timesyncd.service
 
</syntaxhighlight>
 
</syntaxhighlight>
  
You also need to configure timezone.<br />
+
You also need to configure timezone.<br />For servers, it is recommended to choose the UTC timezone. That way, you avoid the time jumping in your log around [https://en.wikipedia.org/wiki/Daylight_saving_time DST] clock shifts.
For servers, it is recommended to choose the UTC timezone. That way, you avoid the time jumping in your log around [https://en.wikipedia.org/wiki/Daylight_saving_time DST] clock shifts.
 
 
<syntaxhighlight lang="console">
 
<syntaxhighlight lang="console">
# dpkg-reconfigure tzdata
+
$ sudo dpkg-reconfigure tzdata
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
[[Category:Linux Server]]
 
[[Category:Linux Server]]

Revision as of 18:36, 20 December 2016

Install Base Commands

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

Setup Clock

Enable NTP to keep your server clock synchronized.

$ sudo apt purge ntpdate
$ sudo systemctl enable systemd-timesyncd.service
Created symlink from /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service to /lib/systemd/system/systemd-timesyncd.service.
$ sudo systemctl start systemd-timesyncd.service

You also need to configure timezone.
For servers, it is recommended to choose the UTC timezone. That way, you avoid the time jumping in your log around DST clock shifts.

$ sudo dpkg-reconfigure tzdata