P E N C I L
Login
apt-get
  1. Process
    1. Update source list (update /etc/apt/sources.list or create a new file  /etc/apt/sources.list.d/filename.list)
    2. sudo apt-get update
      > Error NO_PUBLIC
    3. Add key with apt-key
    4. sudo apt-get update tthen 
    5. sudo apt-get install -y install
      -y: yes for all
  2. /etc/apt/apt.conf.d  folder (it's used even if there is apt.conf file)
    Ignore certificate: http://serverfault.com/questions/340887/using-a-self-signed-ssl-cert-for-an-https-based-internal-apt-repository
    1. http://fossies.org/linux/apt/doc/examples/apt-https-method-example.conf
    2. Example: Acquire::https::apt.dockerproject.org::Verify-Peer "false" (not tested)
  3. Add key
    sudo apt-key adv --keyserver-options http-proxy=http://127.0.0.1:3129/ --keyserver http://keyserver.ubuntu.com:80 --recv-keys KEY
    1. adv: pass advanced parameter to pgp tool
    2. KEY: is the code when run sudo apt-get update
      NO_PUBKEY 'KEY-BC711F9BA15703C6'
  4. Get system configure
    1. cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d= -f2
      -d= : split by '='
      -f2: get field 2 (0-based)
  5. Source list
    1. https://debian-handbook.info/browse/stable/apt.html
    2. https://wiki.debian.org/SourcesList
    3. Stored in /etc/apt/sources.list or  files /etc/apt/sources.list.d/filename.list  
      ex: deb http://ppa.launchpad.net/    trusty    main  (trusty = ubuntu 14.04)
      deb http://a distribution component1 component2
      deb-src http://b com1 com2
      1. distribution (stable/unstable)...
      2. component: main/contrib/non-free