Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I'm on a nokia n810 device, which uses busybox instead of the usual gnu coreutils. Is there a way to get busybox's ls to print in colour?

share|improve this question
up vote 3 down vote accepted

The current busybox version for the latest release of Diablo (43-7) is 1.6.1, which as you've seen doesn't include options for colour.

A fully coloured version of ls can be installed on the n810 from Andrey's repository.
If you don't wish to install and use this repository you can install ls-color manually by downloading and using dpkg -i.

Then as x3ja says you can create an alias for it, although since Maemo uses Busybox your default shell is sh, so you'll have to put the alias in your .profile

alias ls='ls.color'

Installing bash is also easy if you so wish - bash2 can be installed from the Maemo extras repository, and bash3 is available through the gronmayer link below.

A great resource for finding apps in certain repositories is gronmayer's site, and of course the latest developments from Maemo Talk.

share|improve this answer
I wonder why this isn't default. – Neil May 23 '09 at 6:23
Probably the same reason that they strip the man command and any documentation that gets attached to packagess - free space concern. The n800 and n810 use an almost identical image, but the n800 has much less memory (hence I boot from a 16gb SD card instead of the internal flash). Plus having your ls in colour is a nice feature, but you could get by without it. – Andy May 23 '09 at 6:36
Wouldn't you actually want to put that in a file pointed to by $ENV (which you would set in .profile)? That seems to be the closest thing to .bashrc or .zshrc in plain sh(1). (POSIX doesn't even have /etc/profile or .profile, but it seems most shells do -- dash(1) for example.) – SamB Nov 12 '10 at 15:06

ls --color doesn't work?

I thought it was supposed to on the more recent versions.

share|improve this answer
You're right, but the nokia n810 just has an older version, I guess. – Neil May 20 '09 at 19:09

You could of course put something like this in your login scripts (.bashrc or similar):

alias ls='ls --color=auto'

Then when you type ls, it will actually run the command ls --color=auto and so it will display in colour*.

* Sorry for the British spelling, but I am British after all :)

share|improve this answer
Countries that originally make the language shouldn't have to apologies for spelling words correctly. Just my 2 cents =) – sparks May 21 '09 at 16:58
Thanks for your tuppence worth :). "Sorry" wasn't the correct word perhaps. Maybe I should substitute in "Note". – x3ja May 22 '09 at 8:28
The poster's ls cannot do color, because it's not compiled in. This would be the right solution for a regular ls, but not on busybox. – sleske Jan 25 '10 at 11:27
@sparks: Heck, I'm american and I use British spelling fairly often. I'm consequently always annoyed that spellcheckers are unable to cope with a mixture of US and UK spellings. (It's especially annoying when you want to spell check the documentation in an international software project!) Say, maybe that's why Wikipedia has that "be consistant within an article" guideline... – SamB Nov 12 '10 at 15:11

Your Answer


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.