Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|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
1  
Even if particular languages are common, which version can vary greatly, particularly at times when major revision shifts are happening. Even particularly minor shifts can cause problems, for example, relying on Python features new to 2.7 or 3.1. PHP is a pretty common language to have on Linux servers too, at least any that run a web server. – afrazier Jun 23 '11 at 19:44
up vote 4 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.

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

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.

share|improve this answer
    
A "C Runtime Library" can be described as "Any library that is linked to at run time [...]. Usually, though, the term is reserved for libraries that provide a language's basic interfaces ..." - hellos, cplusplus.com/forum/general/13399 – ThorSummoner Sep 4 '15 at 16:43

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).

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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