คำสั่งพื้นฐาน Ubuntu 20.04

คำสั่ง apt

sudo apt update
sudo apt upgrade
sudo apt install package_name
sudo apt remove package_name
sudo apt autoremove

ที่ command line เลือก default editor ใช้คำสั่ง

$ select-editor

Select an editor.  To change later, run 'select-editor'.
  1. /bin/nano        <---- easiest
  2. /usr/bin/vim.tiny
  3. /bin/ed

Choose 1-3 [1]:

คำสั่ง crontab

  • crontab filename การนำเอาคำสั่ง crontab เข้ามาจากไฟล์อื่น
  • crontab -l ดูคำสั่ง crontab ทั้งหมดที่มีอยู่
  • crontab -e แก้ไข crontab ปัจจุบัน
  • crontab -r ลบคำสั่ง crontab ที่มีทั้งหมด

เสร็จแล้วก็ restart service

$ systemctl status cron
$ sudo systemctl stop cron
$ sudo systemctl start cron
$ sudo service cron status

Package

sudo apt install unzip