Last active
October 31, 2023 08:13
-
-
Save tsur/82974c2cea61614b7e3a to your computer and use it in GitHub Desktop.
linux essentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Common | |
sudo apt-get update | |
sudo apt-get install build-essential gcc g++ make cmake htop curl unzip vim screen supervisor nmap sl meld git outguess firestarter | |
# Install gnome classic | |
sudo apt-get install gnome-session-fallback | |
# Install mate desktop | |
sudo apt-add-repository ppa:ubuntu-mate-dev/ppa | |
sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate | |
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get install --no-install-recommends ubuntu-mate-core ubuntu-mate-desktop | |
# Terminator terminal | |
sudo add-apt-repository ppa:gnome-terminator | |
sudo apt-get update | |
sudo apt-get install terminator | |
# Install ssh | |
sudo apt-get install openssh-client | |
sudo apt-get install openssh-server | |
# Install tmux | |
sudo add-apt-repository ppa:pi-rho/dev | |
sudo apt-get update | |
sudo apt-get install tmux | |
# Install stable node and npm version through nvm | |
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash | |
nvm install stable | |
# Install Applications: chromium, chrome, virtualbox, gimp, vlc, thunderbird, skype, mongodb, redis, postgres, mysql, dropbox... | |
# Install the jdk | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
# The jdk version, update to other as 8u51-b16. Note: Not totally tested yet | |
jdk_version="8u71" | |
jsdk_revision="b15" | |
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/$jdk_version-$jdk_revision/jdk-$jdk_version-linux-x64.tar.gz | |
sudo mkdir /opt/jdk | |
sudo tar -zxf jdk-$jdk_version-linux-x64.tar.gz -C /opt/jdk/ | |
rm jdk-$jdk_version-linux-x64.tar.gz | |
# Alternative for the rest below (update-alternatives) if it does not work | |
echo "export PATH=/opt/jdk/:$PATH" >> ~/.bashrc | |
. ~/.bashrc | |
sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_71/bin/java 1 | |
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_71/bin/javac 1 | |
sudo update-alternatives --config java 1 | |
sudo update-alternatives --config javac 1 | |
java -version | |
javac -version | |
# Install virtualenv & virtualenvwrapper | |
_DISTRIBUTE_URL="http://python-distribute.org/distribute_setup.py" | |
_WORKON_HOME="/home/zuri/.virtualenvs" | |
_DEFAULT_MKENV="mkvirtualenv --no-site-packages --distribute" | |
curl -O "$_DISTRIBUTE_URL" | |
python distribute_setup.py | |
easy_install pip | |
# autocompletion for pip | |
pip completion --bash >> ~/.bashrc | |
# Install virtualenv and virtualenvwrapper | |
# virtualenvwrapper offers nice and simple commands to manage your virtual environments. | |
pip install virtualenv | |
pip install virtualenvwrapper | |
#First we export the WORKON_HOME variable which contains the directory in which our virtual environments are to be stored | |
mkdir $_WORKON_HOME | |
echo "export WORKON_HOME=$_WORKON_HOME" >> ~/.bashrc | |
#install globally virtualwnvwrapper commands | |
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc | |
#Also we will create an alias for mkvirtualenv so that by default it does not use the system wide site-packages, and does use distribute rather than setuptools | |
echo "alias mkvirtualenv='$_DEFAULT_MKENV'" >> ~/.bashrc | |
#we can also add some extra tricks like the following, which makes sure that if pip creates an extra virtual environment, it is also placed in our WORKON_HOME directory | |
echo "export PIP_VIRTUALENV_BASE='$_WORKON_HOME'" >> ~/.bashrc | |
source ~/.bashrc | |
rm distribute_setup.py | |
rm distribute-0.6.49.tar.gz | |
# inputrc | |
vim /etc/inputrc | |
# alternate mappings for "page up" and "page down" to search the history | |
#"\e[5~": history-search-backward | |
#"\e[6~": history-search-forward | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
"\e[C": forward-char | |
"\e[D": backward-char |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment