Skip to content

Instantly share code, notes, and snippets.

@shahali007
Last active May 12, 2022 08:44
Show Gist options
  • Select an option

  • Save shahali007/ee8101f2710e7dc125083616075177ec to your computer and use it in GitHub Desktop.

Select an option

Save shahali007/ee8101f2710e7dc125083616075177ec to your computer and use it in GitHub Desktop.
pc configuration after linux/ubuntu installation

Ubuntu 22

Update & upgrade

sudo apt update
sudo apt upgrade

Install curl vim git

sudo apt install curl vim git

Chrome

  • Download :

    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    
  • Install :

    sudo dpkg -i google-chrome-stable_current_amd64.deb
    

Update again before node installation

sudo apt update
or
sudo apt-get update

Install Node

Go to the link: https://github.com/nodesource/distributions/blob/master/README.md

  • To compile and install native addons from npm you may also need to install build tools - sudo apt-get install -y build-essential

Install yarn

Go to the link : https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable

Or

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

curl https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/dn.yarnpkg.com.gpg >/dev/null

update and install

sudo apt update && sudo apt install yarn

Docker

Go to the link: https://docs.docker.com/engine/install/ubuntu/

  • Uninstall old version of docker (if exists)

    sudo apt-get remove docker docker-engine docker.io containerd runc
    

Install docker using repository

  • Update

    sudo apt-get update
    
    sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release
    
  • Add Docker's official GPG key

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    
  • Use the following command to set up the stable repository

    echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  • Update & install

    sudo apt-get update
    
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
    
  • Do the following

    sudo usermod -aG docker $USER
    
    newgrp docker
    
    docker version
    
    sudo systemctl status docker
    

Docker compose

  • Install using the repository

    sudo apt-get update
    sudo apt-get install docker-compose-plugin
    

Install zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

sudo apt install zsh

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by

    sudo git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    
  • Download zsh-syntax-highlighting by

    sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    
  • Open .zshrc file. find plugins=(git)

    sudo vim ~/.zshrc
    
  • Append zsh-autosuggestions & zsh-syntax-highlighting to plugins() like this

    plugins=(... git zsh-autosuggestions zsh-syntax-highlighting)
    
  • Reopen terminal

Install PHP

  • Update apt

    sudo apt update && sudo apt upgrade
    
  • Install few dependencies required by this tutorial with the below-mentioned command

    sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https
    
  • Add the Ondrej PPA to your system, which contains all versions of PHP packages for the Ubuntu systems.

    sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
    
  • Update apt again

    sudo apt update
    
  • Insall php now. This command will install latest stable php version

    sudo apt install php
    
  • Install php extenstion

    sudo apt install php-[extension]
    
    // ex: sudo apt install php-mbstring php-xml php-bcmath
    
  • Check Active PHP Version

    php -v
    
  • Check php extension list (installed)

    php -m
    

sudo apt update

sudo apt upgrade

Install curl git vim wget

sudo apt install git curl vim wget

Chrome

Download : wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

install : sudo dpkg -i google-chrome-stable_current_amd64.deb

Node

https://github.com/nodesource/distributions/blob/master/README.md

Yarn

https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable

Install docker

sudo apt update

sudo apt install -y ca-certificates curl gnupg lsb-release

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

sudo apt install docker-ce docker-ce-cli containerd.io -y

sudo usermod -aG docker $USER

newgrp docker

docker version

sudo systemctl status docker

Install docker compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

docker-compose --version

Install zsh

https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH

sudo git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

open .zshrc and place 'zsh-autosuggestions' and 'zsh-syntax-highlighting' inside plugins=()

plugins=(... zsh-autosuggestions zsh-syntax-highlighting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment