Linux - General
Gnome
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
Grub
In /etc/default/grub, add to GRUB_CMDLINE_LINUX (GRUB_CMDLINE_XEN):
- dom0_mem=max:1024M dom0_max_vcpus=1
grub2-mkconfig -o /boot/grub2/grub.cfg
systemctl
systemctl start something systemctl stop something systemctl enable something systemctl disable something systemctl list-unit-files --type=service
SELinux
getenforce setenforce 1 setenforce Enforcing sestatus
Boolean flags:
getsebool -a setsebool -P httpd_read_user_content
Swap
Add filesystem swap:
fallocate -l 1G /somepath/swap chmod 600 /somepath/swap mkswap /somepath/swap swapon /somepath/swap
Check:
swapon NAME TYPE SIZE USED PRIO /dev/sda2 partition 8G 219.8M -2 /somepath/swap file 1024M 0B -3
And then add a line to /etc/fstab to ensure it is enabled at boot:
/somepath/swap swap swap defaults 0 0
Timezone
Show available zones:
timedatectl list-timezones
Set and check:
timedatectl set-timezone timedatectl timedatectl
UDEV
Rules files in /etc/udev/rules.d
Display device attributes with:
udevadm info --query=env --name=/dev/sdg
See also: Udev Rules