Linux
Command
Add new user
useradd <username> passwd <username> Enter password
check memory and restart service when less than X gb.
bash#!/bin/bash # Get the available memory in KBfree_mem_kb=$(free -k | grep Mem | awk '{print $...
change ownership
basic chown <user>:<group> <option> <path> chown www-data:wheel -R /var/www/html/project_name ...
Curl
simple curl GET ``shcurl "https://api.onesignal.com"`` simple curl POST ``shcurl -X "POST" "ht...
nginx basic ssl config
```server { listen 80 default_server; listen [::]:80 default_server; location / { ...
NPT
# Centos 7 ```install: yum install ntp -y``` ``vi /etc/ntp.conf`` ``server 192.168.1.100 iburs...
linux permission
# chown ``chown user directory`` > chown ali /var/www/html/project/index.php> chown ali /var/ww...
basic config php system
## ssh ssh -l root 159.223.43.172 sudo dnf update -y ## php dnf install https://dl.fedoraproj...
supervisord
yum install supervisor -- ubuntu apt-get update -yapt-get install supervisor -yvi /etc/supervis...
traceroute mtr mytraceroute
## tracert ``tracert <url>`` ``tracert pcdev.kpdn.gov.my`` ## traceroute // install ``apt in...
wkhtmltopdf
# Centos 8 ```shwget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.centos8.x8...
Ubuntu Setup
install mysql-servercreate user 'hub'@'localhost' IDENTIFIED BY 'The-Best-WAY-2024';create user '...