How to create swap file on Ubuntu

Normally a 2GB should be enough for swap on Ubuntu, the following commands will help you create that, but you can also make change to fit your need.

sudo swapoff -a # turn off current swap so it can be updated
sudo fallocate -l 2G /swapfile # create a /swapfile of 2GB, if you want 16GB just change this number
sudo chmod 600 /swapfile # change write permission
sudo mkswap /swapfile # make the file as swap
sudo swapon /swapfile # finally add it to swap config

Then you also need to edit this file /etc/fstab as following for swap section:

/swapfile swap swap defaults 0 0
Add to my src(0)

No account yet? Register

How to install Postgresql 13 on Ubuntu 20.04

The following commands will help you quickly install Postgresql latest version 13 or a custom version on your Ubuntu/Debian machine

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
sudo apt-get -y install postgresql

Of course you can also install some other packages that would help during software development or usage:

postgresql-client-12 : client libraries and client binaries
postgresql-contrib-9.x : additional supplied modules (part of the postgresql-xx package in version 10 and later)
libpq-dev : libraries and headers for C language frontend development
postgresql-server-dev-12 : libraries and headers for C language backend development
pgadmin4 : pgAdmin 4 graphical administration utility

Add to my src(0)

No account yet? Register

Install Google Chrome on Linux using Terminal

Open source Chromium:

sudo apt update 
sudo apt upgrade
sudo apt install chromium-browser -y

Install Google Chrome on Linux using Terminal

sudo apt update
sudo apt upgrade
sudo apt install wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
rm -rf ./google-chrome-stable_current_amd64.deb
Add to my src(0)

No account yet? Register