Linux学习笔记

这个学习笔记是根据Redhat7《System Administrator's Guide》学习时所记下的部分要点。

chapter 1 Locale

the text console command is “localectl”,popular options:

  1. status
  2. list-locales
  3. set-locale LANG=
  4. list-keymaps
  5. ...

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:

  1. without option(display current date and time)
  2. restart system-timedated.services(if the chrony or ntpd was changed,better to run this command )
  3. set-time HH:MM:SS(similar to both use date --set and hwclock --systohc;will fail if ntp service works)
  4. set-local-rtc boolean(boolean is replaced by yes or no to determine to use local time or UTC)
  5. set-time YYYY-MM-DD(change the current date;without specifying the current time,the time will be setted to 00:00:00)
  6. list-timezones
  7. set-timezones timez_one
  8. set-ntp boolean(synchronizate the time from remote server using NTP protocol)

date

is availiable on all Linux systems.

popular options:

  1. without option(display the date and time)
  2. --utc/-u(display in UTC)
  3. +"format"(custom display using "%" and the first letter of the time word)
  4. --set HH:MM:SS
  5. --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:

  1. without options
  2. --set --date "dd mmm yyyy HH:MM"
  3. --systohc
  4. --hctosys
  5. --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.

User Private Group

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 一开始,我以为这又是一部关于爱情的鸡汤书。《谢你不娶之恩》,听起来那么拽,可是做起来真是难如登天啊。经常有人说世界...
    林资言阅读 259评论 0 1
  • 我没有足够的幸运来选择一个好的出生。就像世界上三分之二的人一样无法拥有一个不努力就可以让你过得很好的家庭。没有那...
    青韵之安阅读 413评论 0 0
  • 今天,我们来灌个鸡汤! 我记得拿破仑希尔曾经说过:穷人有两个非常典型的心态,永远对机会说”不“,总想着”一夜暴富“...
    苏东生Ins阅读 335评论 0 0
  • 当电脑闪闪发光的屏幕上显示出的那几个数字和我手里那张薄薄纸上数字完全吻合后,我心和手同时颤抖了起来。 我拼命地让自...
    半朽阅读 742评论 11 15
  • 上完两次课以后,明显的改变就是开始联想了,横的、纵的、天马行空的,虽然稍纵即逝,虽然有时正在我为自己有点小兴奋...
    暖暖的高效慢生活阅读 567评论 3 0