Find the answer to your Linux question:
Results 1 to 4 of 4
Hi I am reletively new at BSD and I figured out how to change to a bash shell but how do I make it color? I mean the text is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058

    color in shell


    Hi I am reletively new at BSD and I figured out how to change to a bash shell but how do I make it color? I mean the text is all black now and when I type ls I want the programs to be colored like green for exe and blue for directory that type stuff.
    Thanks
    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    Try aliasing ls to "ls --color=tty" or something like that. You can put a line like this in your .bashrc
    Code:
    alias ls="ls --color=tty"

  3. #3
    Linux Engineer
    Join Date
    Aug 2004
    Posts
    826
    Quote Originally Posted by spoon!
    Try aliasing ls to "ls --color=tty" or something like that. You can put a line like this in your .bashrc
    Code:
    alias ls="ls --color=tty"
    I may be wrong, but I think "ls --color" only works on Linux. On FreeBSD, the equivalent would be "ls -G". Check the manual page for ls to be sure.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    It's the ls from coreutils that has the --color switch, if you install(ed) coreutils then it will be called gls. I always preferred that one over the default fbsd one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •