How do I know what programming languages (I mean their compilers and interpreters) are already pre-installed in Ubuntu? For example, I see that Python is here. If I type python command in the terminal, it turns out that I have python version 2.7.12. But what about other popular programming and scripting languages like Ruby, Perl, C, Lua, awk, Java, PHP, etc. etc. Should I try to launch them in the terminal or try something like language --version one by one, or is there a better way to know this?
Asked
Active
Viewed 5,528 times
3
ThunderBird
- 1,915
- 13
- 19
- 31
A. N. Other
- 197
- 3
- 9
-
You cannot "install" a language on any system .. there are interpreters and compilers you install and since they are sometimes similar sometimes really different I don't think there is a simple way to check for all of them rather than checking one by one – derHugo Jul 03 '17 at 13:46
4 Answers
5
An article in Ubuntu's own help pages points out five (perl, python, ruby, awk, and sed) are installed by default.
-
Ruby? Note that the community wiki used to be editable by anyone, so it's not authoritative. – muru May 22 '18 at 01:05
4
As of latest LTS release , 16.04, Ubuntu comes with Perl 5, GNU awk (used to be mawk), Python 2 and 3 by default. Not entirely sure about C compiler. You may need build-essential package installed
For everything else, use apt-cache policy **package-name** to see if it is installed. You can also view the release manifest files as described in this answer:https://askubuntu.com/a/48894/295286
Sergiy Kolodyazhnyy
- 103,293
- 19
- 273
- 492
-
1
-
@ChaiT.Rex Well, they're shells technically, both conforming to standard Shell Command Language specifications, but `bash` having more advanced syntax. So technically they're not "programming languages" as in C or Python sense, but yes good mention of the two. – Sergiy Kolodyazhnyy May 22 '18 at 07:40
2
I wrote a small bash script. Its very basic but its something
#!/usr/bin/env bash
languages="php python go perl mysql c c++ java"
binaries="ls /usr/bin"
for i in $languages ; do
for j in $($binaries); do
if [[ $i == $j ]]; then
echo $i
fi
done
done
f_i
- 131
- 1
- 3
1
type whereis [program]. if nothing shows up then it is not installed. A rather silly way,but still usable.
Camden
- 617
- 2
- 6
- 17