Ubuntu

Installation

  1. Download Ubuntu.
  2. Create a boot thumb drive.
  3. Install Ubuntu on MacBook.
  4. Examine the installation:

     $ lsb_release -a
     No LSB modules are available.
     Distributor ID:    Ubuntu
     Description:    Ubuntu 19.04
     Release:    19.04
     Codename:    disco
    
     $ gcc -v
     gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1)
    
     $ make -v
     GNU Make 4.2.1
    
  5. Install TLP to prevent overheating.

     $ sudo add-apt-repository ppa:linrunner/tlp
     $ sudo apt-get update
     $ sudo apt-get install tlp tlp-rdw
     $ sudo tlp-stat -s
     --- TLP 1.2.2 --------------------------------------------
    
     +++ System Info
     System         = Apple Inc. 1.0 MacBookPro11,4
     BIOS           = MBP114.88Z.0172.B09.1602151732
     Release        = Ubuntu 19.04
     Kernel         = 5.0.0-20-generic #21-Ubuntu SMP Mon Jun 24 09:32:09 UTC 2019 x86_64
     /proc/cmdline  = BOOT_IMAGE=/boot/vmlinuz-5.0.0-20-generic root=UUID=1af8f199-45a1-4481-b719-7449cdabb850 ro quiet splash vt.handoff=1
     Init system    = systemd v240
     Boot mode      = UEFI
    
     +++ TLP Status
     State          = enabled
     RDW state      = enabled
     Last run       = 06:58:36 AM,   1265 sec(s) ago
     Mode           = AC
     Power source   = AC
    
  6. Install PSensor to monitor temperature.

     $ sudo apt-get install lm-sensors hddtemp
     $ sudo sensors-detect
     $ sudo apt-get install psensor
    
  7. Install Gnome Tweaks.

  8. Fix Wi-Fi reconnect issues:

    1. sudo nano /lib/systemd/system-sleep/wififix
    2. Add the following:

       #!/bin/sh
      
       set -e
      
       if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
           case "$1" in
               pre) true ;;
               post) sleep 1 && service network-manager restart ;;
           esac
       fi
      
    3. sudo chmod +x /lib/systemd/system-sleep/wififix

  9. Prevent flickering.

  10. Install Chrome. Install React Developer Tools. See Chrome keyboard shortcuts.

     Ctrl + u shows html.
     Fn + Left Arrow scrolls to top.
     Fn + Right Arrow scrolls to bottom.
    
  11. Install Visual Studio Code and the Prettier - Code formatter extension.

     Ctrl + Shift + I to format code.
    
  12. $ sudo apt install screen

  13. Install cURL.

     $ sudo apt-get update
     $ sudo apt-get install curl
     $ curl --version
    
  14. Install surge.

     $ sudo npm install --global surge
    
  15. Install Node.js.

     $ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
     $ sudo apt-get install -y nodejs
     $ node -v
     v10.16.0
     which node
     /usr/bin/node
    
  16. Install Git.

  17. Install Apache Web Server.

    • I used sudo systemctl disable apache2 to disable by default.
    • Use sudo systemctl start|stop apache2.
    • Configuration file is /etc/apache2/apache2.conf.
    • Public directory is /var/www/html.
    • View at http://localhost:80
  18. Install VMware Player. See also mini.iso, ubuntu-mate.org.
  19. Install Docker. See also How To Install Docker on Ubuntu 19.04.

     Add $USER to the docker group.
     $ sudo systemctl enable docker
     $ sudo systemctl disable docker
     $ sudo docker run hello-world
     $ sudo docker run -it ubuntu bash
    
  20. sudo apt install net-tools

  21. Install Universal Password Manager.
  22. sudo apt install sox for .wav files.
  23. See How to fix the slow apt-get update issue on Linux machines.
  24. See How to pass password to scp.

  25. Install Etcher. See linuxhint.com/install_etcher_linux.