Table of Contents

Linux Admin

Reference Useful Linux Commands SSH

Schedule routine with crone

Linux cron utility is an effective way to schedule a routine background job at a specific time and/or day on an on-going basis.

Display all scheduled routine crontab -l
Add a scheduled routine crontab -e

Routine Format Example: 0 4 * * * /opt/comlab/users/shaoguoh/bin/update_outpost_repo.sh https://mts.lantiq.com/~wlnsw/repo/project/ugw /tmp2/shaoguoh/project/ugw.clone_only

By the way, first 5 digits means: MIN HOUR DOM MON DOW CMD

  0 – 0th Minute
  04 – 04 AM
  * – every day
  * – every month
  * – Every day of the week

User groups management

Set user to a primary group list only usermod -G groups username
Add user to other groups based on current groups usermod -aG additional_groups username
Display user's groups groups username

how to know current shell

Shorthand at the Command Prompt

Typical Dot Files(.*)

Useful Files