Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rbaker26/b2fa03f4d63a646601f5a1a1d416ea5e to your computer and use it in GitHub Desktop.
Save rbaker26/b2fa03f4d63a646601f5a1a1d416ea5e to your computer and use it in GitHub Desktop.
Window Subsystem for Linux Installation Tutorial for C++ Classes
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!bin/bash
sudo apt-get update # Update package lists
# C++ Packages
sudo apt install clang -y # C\C++ compiler
sudo apt install g++ -y # C\C++ compiler
# Two different compilers can give you
# different error messages. Try compiling with
# both to get more information when your build
# is broken.
sudo apt install valgrind -y # A memory error detector
sudo apt install make -y # Build system for MakeFiles
sudo apt install cmake -y # MakeFile generator
# Misc. Programing Packages
sudo apt install git -y # Git Version Control
sudo apt install net-tools -y # Contains ifconfig (like ipconfig in windows)
sudo apt install nodejs -y # JavaScript Runtime – good to have
# Uncomment this line if you want to install the SSH client
# Note: you will have to configure this yourself. It does take a while.
# sudo apt install openssh-client -y
# Uncomment this line if you want to install the SSH server.
# This is for the server, or the computer that will sit at home.
# Only one of these two SSH packages should be installed on one machine.
# Note: you will have to configure this yourself. It does take a while.
# sudo apt install openssh-server -y
# If the scripts a taking a very long time and you see numbers in you shell
# like 2001:0db8:85a3:0000:0000:8a2e:0370:7334, try the following commands
# to switch from using the ipv6 servers to the more plentiful ipv4 servers.
#
# sudo apt-get -o Acquire::ForceIPv4=true update
# sudo apt -o Acquire::ForceIPv4=true install <package_name> -y
#
# Replace package name with all the package names above (i.e. clang, g++).
# This might make installation go faster if the few ipv6 servers are bogged
# down.
sudo apt-get dist-upgrade # Update all packages and handle dependencies
# If the above is taking to long, try the following command to use the ipv4
# servers again.
# sudo apt -o Acquire::ForceIPv4=true dist-upgrade
# Now your WSL should be completely up-to-date and ready to use.
@Hwangsta
Copy link

Wow thanks a lot! Great tutorial man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment