brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: timedatectl set-timezone fixes the zone of a linux server

Linux
~/tips/tip-linux-timedatectl-set-timezone

sudo timedatectl set-timezone Europe/Amsterdam

Sets the system time zone with a name from the official list.

Servers often ship in UTC, which makes cron times and log stamps confusing.

timedatectl list-timezones | grep Amsterdam
sudo timedatectl set-timezone Europe/Amsterdam

list-timezones prints every valid name, so a grep finds the exact spelling. set-timezone updates the /etc/localtime link. Services that read the zone at start, such as cron and some daemons, may need a restart to notice. Many admins keep servers in UTC on purpose, and that is fine as long as every log reader knows it.

Further reading: timedatectl manual page

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link