Linux ls Colour-coding in PuTTY

PuTTY is a damn useful app for when it comes to gaining remote access into a machine via SSH or Telnet, and has more than proven its worth to serious geeks over the years since it was first released.

But here’s a question that you’ll be asking if you are new to the whole command line SSH into Linux access thing:

“Just what does all the colour-coding (when it comes to folder listings) displayed in PuTTY mean?”

Well, basically the colour-coding is to expediate file type recognition. For example, the default colour set is as follows (thanks Google!):

  • * Normal file: White (or the default colour used by the command line window)
  • * Directory: Blue
  • * Symbolic link: Cyan
  • * Pipe: Yellow
  • * Socket: Magenta
  • * Block device driver: Bold yellow foreground, with black background
  • * Character device driver: Bold yellow foreground, with black background
  • * Orphaned syminks: Blinking Bold white, with red background
  • * Missing links: Blinking Bold white, with red background
  • * Archives or compressed files: Red (e.g. .tar, .gz, .zip, .rpm)
  • * Image files: Magenta (.jpg, gif, bmp, png, tif)

To manipulate or view just what colours your system is spitting out you, simply pay a visit to /etc/profile.d/colors.sh and /etc/profile.d/colors.csh

There, hope that helps! :)

(Tip: If you wish to disable the list colouring, simply remove the alias that attaches ls –color=tty to ls – run `alias` to see what I’m referring to.)

You might also enjoy:

  • A bash script is simply put a file containing a list of commands to be executed by the bash shell (remember, there are a number of different shells availabl ...
  • Sometimes you just don't want to use the good old anchor tag and want to use a tag instead, but at the same time, you want people who mouse-over your span ...
  • Let's start this off with a quick, NEVER should you be suppressing errors instead of trying to resolve the scenarios in which an error can occur. However ...
  • TimThumb, created and maintained by Tim McDaniels, Ben Gillbanks and Darren Hoyt, is a rather popular open source, image resizing PHP script, mostly used fo ...
  • One of the things we do here at Touchwork is create web-based audit capture systems which are intended for use on mobile phones by various auditor class peo ...

About Craig Lotter

Craig Lotter is an established web developer and application programmer, with strong creative urges (which keep bursting out at the most inopportune moments) and a seemingly insatiable need to love all things animated. Living in the beautiful coastal town of Gordon's Bay in South Africa, he games, develops, takes in animated fare, trains under the Funakoshi karate style and for the most part, simply enjoys life with his amazing wife and daughter. Oh, and he draws ever now and then too.
This entry was posted in Software & Websites and tagged , , PuTTY, . Bookmark the permalink.
  • http://duo.nanoverso.com/ Nathan Rodriguez

    Color enabled command shells really make a difference, you just notice it when you come at a black and white only one.
    .-= Nathan Rodriguez´s last blog ..Seguro de Transporte =-.

  • http://duo.nanoverso.com/ Nathan Rodriguez

    Color enabled command shells really make a difference, you just notice it when you come at a black and white only one.
    .-= Nathan Rodriguez´s last blog ..Seguro de Transporte =-.

  • http://www.craiglotter.co.za Craig Lotter

    Absolutely! The visual aid the colouring provides is fantastic. Allows your eye to instantly pick out the various files, folders and symlinks…

  • http://www.craiglotter.co.za Craig Lotter

    Absolutely! The visual aid the colouring provides is fantastic. Allows your eye to instantly pick out the various files, folders and symlinks…

  • http://www.computertroubleshooters.co.uk computer repair

    Great blog, I am new to this and the colour coding was confusing. Your explain really well so much appreciated.

  • http://www.jamescash.co.uk IT support birmingham

    Thanks for posting this Craig. I have been getting so frustrated with the colour coding and I wasn't able to find any articles or blogs that explained so this has come at the right time! I'll try to use that code you've posted up and see how it goes.

blog comments powered by Disqus