4

Hey guys i am new to this just started studying computer science and programming and this is the first time im using linux. So how to get the latest version of gcc on ubuntu or does it make a difference (im using 5.4 right now).

3 Answers3

6

The latest version is obtained simply by running:

sudo apt update && sudo apt dist-upgrade

then installing with

sudo apt install build-essential

This will install gcc and other programs you will need. Then of course if you want the latest you can compile it yourself. But using the above installation commands you will be able to get the latest for Ubuntu 16.04 lts

evandrix
  • 117
  • 1
  • 6
George Udosen
  • 37,534
2

Enable this ppa

https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test

Read here for info

https://wiki.ubuntu.com/ToolChain

doug
  • 17,212
1

The best way would be to just use the one in the repos. Simply open a terminal window and type 'apt-get install gcc' and after entering your root password, you will have the gnu compiler collection!

Kyle H
  • 1,064
  • 6
  • 7