这个学习笔记是根据Redhat7《System Administrator's Guide》学习时所记下的部分要点。
chapter 1 Locale
the text console command is “localectl”,popular options:
- status
- list-locales
- set-locale LANG=
- list-keymaps
- ...
And we can use man localectl or localectl --helpfor help and more imformation;
the configuration file is located at /etc/locale.conf
chapter 2 Date and Time
the text console commands are timedatectl(which is new in RedHat 7),date(traditional command) and hwclock(for hardware)
timedatectl
part of systemd system and be able to change the configuration of system clock.
popular options:
- without option(display current date and time)
- restart system-timedated.services(if the chrony or ntpd was changed,better to run this command )
- set-time HH:MM:SS(similar to both use date --set and hwclock --systohc;will fail if ntp service works)
- set-local-rtc boolean(boolean is replaced by yes or no to determine to use local time or UTC)
- set-time YYYY-MM-DD(change the current date;without specifying the current time,the time will be setted to 00:00:00)
- list-timezones
- set-timezones timez_one
- set-ntp boolean(synchronizate the time from remote server using NTP protocol)
date
is availiable on all Linux systems.
popular options:
- without option(display the date and time)
- --utc/-u(display in UTC)
- +"format"(custom display using "%" and the first letter of the time word)
- --set HH:MM:SS
- --set HH:MM:SS --utc
ATTENTION:Careful about the distinguish of the component between timedatectl and date while setting current date and time,and the former is one component using the symbol '' besides the latter is both one and two component using the key space.
hwclock
When the operating system shutdown,the hardware clock keeps run.And this command configurates and managers the hardware clock.
popular options:
- without options
- --set --date "dd mmm yyyy HH:MM"
- --systohc
- --hctosys
- --systohc --localtime/--utc
chapter 3 Managing Users and Groups
see the reserved uid an gid by using this command:
cat /usr/share/doc/setup*/uidgid
It's recommended to assign non-reserved IDs starting from 5000,by changing the value of UID_MIN and GID_MIN in /etc/login.defs file.
网友评论