แสดงบทความที่มีป้ายกำกับ Operating System แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ Operating System แสดงบทความทั้งหมด

วันจันทร์ที่ 21 มีนาคม พ.ศ. 2565

(Shortcut) TAR File

# TAR Command Line

### 1 Create Archive File / Directory / Zip ###
# -c create
# -z gzip, gunzip, ungzip
# -f file

tar -cf archive.tar file1 file2
tar -cf archive.tar dir/
tar -czf archive.tar.gz dir/

### 2 Show Detail in Archive File ###
# -t list
# -v verbose
# -f file

tar -tf archive.tar
tar -tvf archive.tar

### 3 Extract Archive File ###
# -x extract
# -z gzip, gunzip, ungzip
# -v verbose
# -f file

tar -xvf archive.tar
tar -xzvf archive.tar.gz

วันศุกร์ที่ 18 มีนาคม พ.ศ. 2565

(Shortcut) Install MariaDB Server 10.3 on Ubuntu 20.04

# update package and install
sudo apt update
sudo apt install mariadb-server mariadb-client

sudo mysql_secure_installation

sudo mysql -u root -p
# system will ask 2 password
# 1 linux user password
# 2 mysql root password

วันพฤหัสบดีที่ 1 กรกฎาคม พ.ศ. 2564

(Shortcut) Uncomplicated Firewall on Ubuntu 20.04

ref https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/ ref https://www.cyberciti.biz/faq/how-to-configure-firewall-with-ufw-on-ubuntu-20-04-lts/ sudo lsof -i:[port-number] sudo lsof -i -P -n | grep LISTEN sudo ufw status sudo ufw status numbered sudo ufw delete [number] sudo ufw enable sudo ufw disable sudo ufw allow 80/tcp comment 'accept Apache' sudo ufw allow 443/tcp comment 'accept HTTPS Connections' sudo ufw allow from [ip]

วันจันทร์ที่ 16 ธันวาคม พ.ศ. 2562

(Shortcut) Update NPM and Node.JS

คำสั่งที่ใช้ในการ Update npm
# แสดง Version ของ npm
npm -v 

# Upgrade npm เป็น Version ล่าสุด
npm install -g npm@latest 

คำสั่งที่ใช้ในการ Update node.js
# แสดง Version ของ node.js
node -v 

# Upgrade node.js เป็น Version ล่าสุด
npm install -g node