/Unix-Cheatsheet

Useful UNIX Commands and Settings

Unix-Cheatsheet

Setting Proxy

First of all,

Configure using GUI

Open the network settings and set the your system wide network proxy. Network -> Network proxy -> Configure -> Apply system wide.




~ Denotes Home Folder

Add the following lines to ~/.bashrc

export http_proxy=http://USERNAME:PASSWORD@SERVER:PORT/
export https_proxy=https://USERNAME:PASSWORD@SERVER:PORT/

Add the following lines to /etc/apt/apt.conf

Acquire::http::Proxy "http://USERNAME:PASSWORD@SERVER:PORT";
Acquire::https::Proxy "https://USERNAME:PASSWORD@SERVER:PORT";

Add the following lines to /etc/bash.bashrc

export http_proxy=http://USERNAME:PASSWORD@SERVER:PORT/
export https_proxy=https://USERNAME:PASSWORD@SERVER:PORT/

Add the following lines to /etc/environment

export http_proxy="http://USERNAME:PASSWORD@SERVER:PORT/"
export https_proxy="https://USERNAME:PASSWORD@SERVER:PORT/"

If Ony Server and Port Given

Example especially for NIT Silchar LAN User's, thanks to CCC :D

SERVER: 172.16.30.20 PORT: 8080

Add the following lines to ~/.bashrc

export http_proxy=http://172.16.30.20:8080/
export https_proxy=https://172.16.30.20:8080/

Add the following lines to /etc/apt/apt.conf

Acquire::http::Proxy "http://172.16.30.20:8080";
Acquire::https::Proxy "https://172.16.30.20:8080";

Add the following lines to /etc/bash.bashrc

export http_proxy=http://172.16.30.20:8080/
export https_proxy=https://172.16.30.20:8080/

Add the following lines to /etc/environment

export http_proxy="http://172.16.30.20:8080/"
export https_proxy="https://172.16.30.20:8080/"

Installation and Extraction of Packages

sudo dpkg -i DEB_PACKAGE sudo apt-get install -f tar -zxvf file.tar.gz

Setting path in java:

gedit ~/.bashrc

JAVA_HOME=/opt/jdk-9.0.1/bin export JAVA_HOME PATH=$PATH:$JAVA_HOME export PATH

Version Check and Update

Version Check

$ lsb_release -a

Update

$ sudo apt install update-manager-core $ sudo do-release-upgrade