Installing Linux, GCC, GDB, Git, CMake, LLVM, Clang, Boost, SFML, CodeLite, Sublime Text 3, And Dropbox On a $140 Lenovo ideapad 120S makes an ultra portable C++ programming laptop.

Listen to the audio podcast to hear my story about how and why I decided to buy an 11 inch Lenovo ideapad 120S. This is the show notes page and here you’ll find the detailed step-by-step instructions that I promised in the podcast. I spent over a week researching and documenting everything I did to get this computer ready so that you can follow along and learn from what I’ve discovered. Maybe some of the instructions could be made similar or simplified more. I tried to make them as simple as possible. Most of these instructions came from other websites, from questions and answers in online forums, and from the product web pages. There were too many sources to keep track of. Some gave conflicting or wrong instructions. And some might have worked by themselves but had trouble with other steps I was doing.

Here, you’ll find a full listing of all the steps and commands that I found to work well. And they should all work well together on this computer. Please let me know if I missed anything or if anything needs further explanation.

Ready? Okay. Follow along and install Linux and all the development tools you’ll need to get started programming.

  • Remove Windows 10 and install Linux instead
    • Go through initial Windows setup and use the installed updating tools to update the computer BIOS.
    • Download Kubuntu from https://kubuntu.org
    • Create bootable USB drive
      • Download UNetbootin from http://unetbootin.github.io
      • Run UNetbootin and select the downloaded Kubuntu and the USB drive and make it bootable.
    • Insert USB drive, restart the Lenovo ideapad, and press Fn-F2 repeatedly while the computer starts up until the BIOS screen appears.
    • Change the boot order so that the computer will try booting from the USB drive first. Save changes and continue restarting the computer.
    • Wait for Kubuntu to start and choose the option to install.
    • Answer the basic setup questions and for the page where it asks how to format and partition the drive, select the guided option that uses the full drive.
  • Useful configuration changes
    • Open the Konsole terminal.
    • Protect root folder from accidental deletion
      • alias rm=’rm -preserve-root’
    • Setup nano as the default editor
      • export editor=nano
  • Install basic build tools and libraries
    • Open the Konsole terminal.
    • Install basic development tools.
      • Allow apt-get to find and install additional software packages.
        • sudo nano /etc/apt/sources.list
        • remove the leading “# ” from near the end where it says to uncomment the following lines to enable partner content. Just uncomment the deb line so it looks like this:
          • deb http://archive.canonical.com/ubuntu bionic partner
      • sudo apt-get update
      • sudo apt-get install build-essential ccache
    • Install CMake
      • sudo apt-get install cmake cmake-gui
    • Install Git
      • sudo apt-get install git gitg
    • Install glogg log file viewer
      • sudo apt-get install glogg
    • Install Boost
      • sudo apt-get install libboost-all-dev
      • This installs the Boost header files to:
        • /usr/include/boost
      • And the Boost libraries to:
        • /usr/lib/x86_64-linux-gnu
    • Install SFML
      • Install prerequisites. SFML installs okay without these but from what I’ve been able to tell, it might not be fully functional without these.
        • These were already installed for me. Installing them directly marked them as a manual install
          • sudo apt-get install libpthread-stubs0-dev
          • sudo apt-get install libgl1-mesa-dev
          • sudo apt-get install libx11-dev
        • sudo apt-get install libxrandr-dev
        • sudo apt-get install libfreetype6-dev
        • sudo apt-get install libglew1.5-dev
        • sudo apt-get install libjpeg8-dev
        • sudo apt-get install libsndfile1-dev
        • sudo apt-get install libopenal-dev
      • sudo apt-get install libsfml-dev
      • This installs the SFML header files to:
        • /usr/include/SFML
      • And the SFML libraries to:
        • /usr/lib/x86_64-linux-gnu
  • Add more storage space for about $25 (Optional)
    • Buy a 32 GB Micro SD card. Make sure it really is Micro. It will probably come with a bigger SD card adapter. You only need the smaller Micro SD card.
    • Run the Dolphin file explorer and create in home folder a new folder called Storage.
    • Insert the drive into the slot in the side of the computer.
    • Open KDE Partition Manager.
    • Select the drive at /dev/mmcblk1
    • Right-click the existing FAT32 partition and choose to delete. If the partition is already ext4, then you probably have the wrong drive selected.
    • Choose the Partition menu and select New.
    • Fill in the options to use the full disk, make a primary partition, select the ext4 filesystem, and give it a label.
    • Click the Apply button at the top to make the changes.
    • Right-click on the ext4 partition at /dev/mmcblk1p1 and Unmount.
    • Right-click on the ext4 partition at /dev/mmcblk1p1 and Edit Mount Point
    • Choose the Storage folder you created in the home folder.
    • Right-click on the ext4 partition at /dev/mmcblk1p1 and Mount.
    • Take ownership of the newly formatted drive. Replace “user” below with your user name.
      • Open the Konsole terminal
      • cd ~
      • sudo chown -R user:user Storage
    • Use the Dolphin file explorer to create or move the following folders from your home folder into the Storage folder. You can recreate the folder icons by viewing the folder properties and clicking the folder icon in the properties dialog.
      • Documents
      • Downloads
      • Music
      • Videos
  • Configure Git. Use your own name and email below.
    • Open the Konsole terminal.
    • git config –global –add user.name ‘Your Name In Quotes’
    • git config –global –add user.email you@email.com
    • git config –global –add core.editor nano
    • git config –global –add push.default simple
    • git config –global credential.helper cache
    • git config –global credential.helper ‘cache –timeout=3600’
  • Install Clang and LLVM
    • Open the Konsole terminal.
    • sudo apt-add-repository “deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-6.0 main”
    • wget -O – https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add –
    • sudo apt-get update
    • sudo apt-get install clang llvm
  • Install CodeLite
    • Open the Konsole terminal.
    • echo “deb https://repos.codelite.org/ubuntu/ bionic universe” | sudo tee /etc/apt/sources.list.d/codelite.list
    • sudo apt-key adv –fetch-keys http://repos.codelite.org/CodeLite.asc
    • sudo apt-get update
    • sudo apt-get install codelite wxcrafter
  • Install Dropbox
    • Open the Konsole terminal.
    • echo “deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu xenial main” | sudo tee /etc/apt/sources.list.d/dropbox.list
    • sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 1C61A2656FB57B7E4DE0F4C1FC918B335044912E
    • sudo apt-get update
    • sudo apt-get install python-gpg dropbox
  • Install Sublime Text 3
    • Open the Konsole terminal.
    • wget -qO – https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add –
    • echo “deb https://download.sublimetext.com/ apt/stable/” | sudo tee /etc/apt/sources.list.d/sublime-text.list
    • sudo apt-get update
    • sudo apt-get install sublime-text
  • Install OBS (Open Broadcaster Software)
    • Open the Konsole terminal.
    • sudo add-apt-repository ppa:obsproject/obs-studio
    • sudo apt-get update
    • sudo apt-get install obs-studio