1.0 KiB
1.0 KiB
Linux+ 2.5.2: systemd tools
Setting the hostname and time zone, and changing a kernel parameter now and for good.
Before you start
The lab notes the hostname, time zone and vm.swappiness it finds, so
that le-lab reset can put them back. If the time zone is already UTC,
it sets it to America/Phoenix for now, and if vm.swappiness is already
20, it sets it to 60.
Tasks
- Set the hostname to
lab-alma.example.test(on an Ubuntu VM,lab-ubuntu.example.testis fine too), so that it stays after a reboot. - Set the time zone to UTC.
- Set the kernel parameter
vm.swappinessto 20 now, and in a file in/etc/sysctl.d/so that it's 20 after a reboot too. (The chapter then removes the file again; leave it in place here.)
Hints
hostnamectl,hostnamectl set-hostname,hostname.timedatectl list-timezones,timedatectl set-timezone.sysctl -n,sysctl -w,sysctl --system.- The chapter's steps on
resolvectl(Ubuntu) andsystemd-analyzearen't graded; try them anyway.