Install different gcc version on linux

Get gcc
sudo apt-get install -y gcc-4.8 g++-4.8 gcc-4.9 g++-4.9 gcc-5 g++-5 gcc-6 g++-6 gcc-7 g++-7

Add repo
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update

Reset all gcc/g++ environment
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++

Install gcc/g++ to system
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 30
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 40
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 50

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 30
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 40
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 50

sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --set c++ /usr/bin/g++

Switch gcc/g++ version
sudo update-alternatives --config gcc
sudo update-alternatives --config g++

reinstall git with openssl on ubuntu

sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev
sudo apt-get build-dep -y
sudo apt-get install libcurl4-openssl-dev
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 71240B8FB3641232
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5

#edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.
#Disable test
sed -i -- '/TEST\s*=\s*test/d' ./debian/rules

sudo dpkg-buildpackage -rfakeroot -b

Install new package:

i386: sudo dpkg -i ../git_1.7.9.5-1_i386.deb

x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb

Install KDE Desktop for Ubuntu 24.04

1. Enter following command to install the KDE-plasma sudo apt install kde-plasma-desktop 2. Disable the login screen 2-1. Create default sdd...