Install CLI Tools Ubuntu 18.04

alt oh-my-zsh terminal

Install basic development CLI tools in Ubuntu 18.04. It includes:

  • oh-my-zsh
  • idle
  • venv
  • git
  • tree

Install Git in Ubuntu 18.04 LTS

  • Install Git:

    sudo apt install git
    
  • Add global configuration for Git user:

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"
    
  • Add SSH. Details can be found in this gist

Install Oh My Zsh in Ubuntu 18.04 LTS

  • Install Zsh:

    sudo apt install zsh
    
  • Install git:

    sudo apt install git
    
  • Install oh-my-zsh:

    sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
    
  • Make zsh as default shell:

    chsh -s `which zsh`
    
  • Re-login to desktop to reflect changes.

Install Tools for Python

  • Ubuntu 18.04 comes with Python 3.6.7:

    python3 --version
    Python 3.6.7
    
  • It does not have idle or venv in it.

  • Install idle:

    sudo apt install idle
    
  • Install venv:

    sudo apt-get install python3-venv
    

(Optional) Create Flask application inside virtual environment and run locally:

  • Create new virtual environment and activate it

    python3 -m venv venv
    source venv/bin/activate
    
  • Install flask:

    pip install flask
    
  • Application app.py:

    from flask import Flask
    
    app = Flask(__name__)
    
    @app.route('/')
    def index():
        return "Hello from Flask"
    
  • Environment file .flaskenv:

    FLASK_APP=app.py
    FLASK_ENV=development
    
  • Run the application:

    flask run
    

Install tree package in Ubuntu 18.04

  • Install the package:

    sudo apt install tree
    
  • Show current directory in tree view:

    tree
    
  • Ignore a specific directory in tree view:

    tree -I venv
    
  • Ignore multiple directories or pattern in tree view:

    tree -I 'venv|__pycache__'
    

Reference: