There are many Linux distributions out there and all have different packages installed by default.

What languages are generally installed by default?

I know it is possible to install new packages but some admins do not like this.

Currently I would assume: (Edit: I have added some answers. Thanks)

  • Bash
  • C (run but no compiling)

Often provided languages - Python - Perl

Tools (not languages)

  • grep
  • make
  • sed
  • yacc
link|improve this question

add awk in your list – rmflow Jun 23 '11 at 10:56
3  
Python is quite common. – Juho Jun 23 '11 at 10:57
2  
/bin/sh .. the best. sed is also considered a "language". With sh, awk, sed, you can rule the world. – sdolgy Jun 23 '11 at 10:59
the POSIX environment docs mention the standard command line utilities like grep, make, sed and even yacc. – Vlad Jun 23 '11 at 11:01
tcl is quite common too... – skinp Jun 23 '11 at 13:48
show 2 more comments
feedback

migrated from stackoverflow.com Jun 23 '11 at 19:35

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 3 down vote accepted

You can't assume that Perl or Python are installed, even though they often are. For example, redhat-like distributions usually install Python, but other distributions commonly do not.

You should target specific distributions if this is a problem - or else you'll have to build your own (e.g. python) and ship it yourself - this is the only way of guaranteeing it's available. Actually if you are writing a nontrivial piece of software which needs to be portable to lots of distros, it's probably necessary to ship your own Python.

link|improve this answer
Debian-like distributions also install Python. – CarlF Jun 23 '11 at 20:47
feedback

Make and yacc may not be there. Depending on whether or not you're on embedded systems, bash may not be there either. Code to sh, and Perl if you want to go beyond that (I can't think of a single distro which doesn't come with Perl).

link|improve this answer
1  
Very good point, Arch linux does not come with Make. – Simon Sheehan Jun 23 '11 at 22:08
feedback

The minimum you can expect to find on any unix system that's not antique or embedded is POSIX/Singe UNIX. Specifically, all current unices mostly conform to POSIX:2004, a.k.a. Single Unix issue 6. This gives you sh, sed and awk as programming languages.

If development packages are installed (which they often aren't on a server), you can do development with cc (C compiler), lex, yacc, make; but apart from make these aren't useful on the machines you'll deploy your application to, only on development machines.

If you assume Linux, most distributions follow the Linux Standard Base to some extent. The LSB goes beyond POSIX. The core specification includes a C runtime with support for multithreading, NSS, PAM, ncurses, libz, SSL and a few more libraries. The LSB doesn't require bash, only a POSIX sh which could be ash or ksh, but in practice most non-embedded Linux distributions ship bash as part of the default installation. The languages specification includes Perl and Python. In practice, not all distributions make full LSB support part of their default installation, but you can generally make a good case that if it's specified by LSB (but not in the LSB desktop specification, obviously), it should be installed on a Linux server.

On other systems, Perl is very often available. Python is not as common but gaining popularity. You can pretty much count on either bash or pdksh (but not always; IIRC NetBSD only has ash in its default installation). For compiled languages, you'll always find a C runtime and almost always find a C++ runtime.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.