Linux
Linux Mint optimize
CHMOD all files/directories
find . -type f -exec chmod 660 -- {} +
find . -type d -exec chmod 2770 -- {} +
(-- to prevent name starting with dash as conflict)
Find specific string from directories
grep -Ril "moment.js" /var/www/html/wiki/lib/plugins/edittable
Change SFTP default upload permission (umask)
Ordered List ItemUpdated /etc/ssh/sshd_config with Subsystem sftp /usr/lib/openssh/sftp-server -u XXX
sudo systemctl restart ssh
SSH key login as root
WINSCP allow sudo command with normal account
Mount SMB v3 from Windows
sudo apt install smbclient cifs-utils
mkdir /TARGETFOLDER
Create .credential file (“.” stand for hidden file), content: username=XXX password=XXX (separate line).
CHMOD .credential file to 600
sudo vi /etc/fstab
//XX.XX.XX.XX/SharedFolder /TARGETFOLDER cifs vers=3.0,credentials=.credential,uid=userid,gid=groupid,iocharset=utf8 0 0
sudo systemctl daemon-reload
Mount drive command: sudo mount /TARGETFOLDER
Force unmount drive command: sudo umount -l /TARGETFOLDER
Turn off case sensitive from SSH
sudo nano /etc/inputrc
set completion-ignore-case on
set show-all-if-ambiguous On
restart Terminal
Add display resolution
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DP-3 1920x1080_60.00
xrandr --output DP-3 --mode "1920x1080_60.00"
check processor frequency / temperature
frequency
cat /proc/cpuinfo |grep "cpu MH"
temperature
sensors