Ubuntu Server Commands:
# Commands for Update
sudo apt update && sudo apt upgrade -y
sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
# Remove Extra Packs
sudo apt autoremove
# Programme installtions (curl can be replaced)
sudo apt install curl
# Zip module not installed
sudo apt-get install -y php-zip
apt install php7.2-zip && service php7.2-fpm restart
# List and remove
ls
cd rtorrent/download/path
rm -r filename
# Kill Process
ps aux | grep -i apt
sudo kill
force kill: sudo kill -9
sudo killall apt apt-get
Fix ‘E: Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu
# Nginx installation error in Ubuntu, Shutting down apache2 before installing nginx fix this problem:
sudo service apache2 stop
stop apache2
sudo systemctl stop apache2.service
# Prevent apache2 to start at boot
sudo systemctl disable apache2.service
# Reinstall nginx
sudo apt-get install nginx
# Rclone Copy Commands
rclone copy D:Files/Torrents/PTP/Z /home/sanju/torrents/files -Path Example
Steps for Mount new Drive in VPS:
# Check Current Status of Disks
lsblk
# To create new partition for new Disk.
fdisk /dev/vdb
g
w
fdisk /dev/vdb
n
p
w
q
lsblk -p /dev/vdb
# Format the new partition
mkfs -t ext4 /dev/vdb1
# Mount to Specific Folder
mount /dev/vdb1 /home
# Get UUID
sudo blkid /dev/vdb1
# Change UUID
UUID=7dff4053-f93b-4cea-bc5d-1dc4b1814776 /home ext4 defaults,nofail 0 2
# Paste UUID here so that mount stays on boot
sudo nano /etc/fstab
Immich Steps Guide to let external Drive Access:
# Basic Directory Command
mkdir ./immich-app
cd ./immich-app
# Get docker-compose.yml file
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
# Get .env file
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
# Change .env file
nano .env
# Change these two
UPLOAD_LOCATION=./library
DB_PASSWORD=postgres
# Use the below values if mount for external drive set to /home
UPLOAD_LOCATION=/home/immich/upload
#Finally to Start Immich needs to use after reboot also
docker compose up -d