Skip to content

almalinux

restrict a package to a fixed version

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

list all locks

bash
sudo yum versionlock list

clear locks

bash
sudo yum versionlock clear

remove a lock

bash
sudo yum versionlock delete gcc-*

enable ntp sync

install systemd-timesyncd

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

add your ntp server

txt
[Time]
NTP=time.cloudflare.com

enable and start the service

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

to verify if the time sync is enabled

bash
sudo timedatectl timesync-status

to verify if the time is in sync

bash
sudo timedatectl

change hostname

change hostname between restarts

bash
sudo hostnamectl set-hostname [HOST]

change the hostname, before the restart

bash
sudo hostnamectl --transient set-hostname [HOST]

change the hostname on hosts file

bash
sudo vim /etc/hosts