Skip to content

almalinux

restrict a package to a fixed version

sudo yum install python3-dnf-plugin-versionlock
sudo yum versionlock gcc-*

list all locks

sudo yum versionlock list

clear locks

sudo yum versionlock clear

remove a lock

sudo yum versionlock delete gcc-*

enable ntp sync

install systemd-timesyncd

sudo dnf install systemd-timesyncd
sudo timedatectl set-ntp true

add your ntp server

/etc/systemd/timesyncd.conf
[Time]
NTP=time.cloudflare.com

enable and start the service

sudo systemctl enable systemd-timesyncd
sudo systemctl start systemd-timesyncd

to verify if the time sync is enabled

sudo timedatectl timesync-status

to verify if the time is in sync

sudo timedatectl

change hostname

change hostname between restarts

sudo hostnamectl set-hostname [HOST]

change the hostname, before the restart

sudo hostnamectl --transient set-hostname [HOST]

change the hostname on hosts file

sudo vim /etc/hosts