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).
Asked
Active
Viewed 3.3k times
4
3 Answers
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
- 36,677
2

doug
- 17,026
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,044
- 6
- 7
sudo update && sudo apt dist-upgrade
will give you the latest version supported by Ubuntu 16.04. Ofcousre you can compile the latest if you need it. – George Udosen Dec 29 '16 at 16:48