
List of useful commands
Node Version Manager (NVM)
NVM is a version manager for Node.js, designed to be installed per-user, and invoked per-shell. This allows you to easily install and switch between multiple versions of Node.js.
Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Install Node.js
nvm install 20.19.0
Rsync
With Rsync you can copy files from one server to another. Mainly used for moving big files.
Copy files from a server to a remote server
rsync -av <folder>/ root@<IP>:/root/www/<folder>
Upgrade server storage
With this command you can upgrade the storage of a server. This is useful when you need more space on your server if you misconfigured it in the first place.
sudo vgdisplay
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
And after these steps, you can check the available storage with df -h
, or with sudo btop. Can be installed by; sudo apt install btop
Zscaler
With these commands you can enable and disable Zscaler on a Mac/Linux machine.
Enable Zscaler
open -a /Applications/Zscaler/Zscaler.app --hide
sudo find /Library/LaunchDaemons -name '*zscaler*' -exec launchctl load {} \;
Disable Zscaler
find /Library/LaunchAgents -name '*zscaler*' -exec launchctl unload {} \;
sudo find /Library/LaunchDaemons -name '*zscaler*' -exec launchctl unload {} \;
Find serial number
There's a nifty command to find the serial number of a linux server/device.
sudo dmidecode -s system-serial-number
There are also two alternatives:
cat /sys/class/dmi/id/product_serial
sudo dmidecode | grep -i "serial number"