Check avaiable resources

  • Avaliable memory: in /proc/meminfo
 free -h
#              total        used        free      shared  buff/cache   available
#Mem:            30G        5.3G         18G        120M        7.4G         25G
#Swap:          8.0G        2.0G        6.0G

Daemon process

  • Configuration files of systemd
    • Not modify
      • /usr/lib/systemd/system
      • /lib/systemd/system
    • Can be customized
      • /etc/systemd/system
      • /run/systemd/system
  • List avaiable service
systemctl list-units --type=service
systemctl list-unit-files --type=service
  • Show logging
journalctl

ssh login without typing password

  • Append local public key ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys in remote machine should work

crontab

  • Configuration: minute(s) hour(s) day(s) month(s) weekday(s) command(s)
  • /var/spool/cron/crontabs
  • See https://kb.iu.edu/d/afiz

Account management

  • Add account
    • adduser: a system command, not create home directory
    • useradd: a perl wrapper for adduser, create home directory
  • Remove account
userdel -r {user.name}
  • Change user group
 usermod -a -G {group.name} {user.name}

Network file system (NFS)

NIS, LDAP and single sign on

getent passwd
  • Show password specific to LDAP
getent passwd --service=ldap
touch -t 202001010000.00  test.txt
# use -t -h for symlink