It is possible to use colors on the Unix command-line interface.

learn more… | top users | synonyms (1)

7
votes
3answers
1k views

Change the color of the file name text

I am writing scripts to initialize and configure a large system with many components. Each component has its own log file. I would like to change the color of the component file name to red whenever ...
7
votes
3answers
2k views

Grep_color on mac

I am trying to get my regex highlighted on mac using terminal. I have put this is my .profile: export GREP_COLOR='1;30;40' Nothing changes, so I added the same to my bash.profile still nothing, ...
7
votes
2answers
1k views

red-green color blindness compatible vim theme

I am looking for a vim theme accessible to users with red green color blindness. In particular, the red text on a dark terminal background all but disappears. Do any of you know of a good theme? Or ...
7
votes
3answers
4k views

Disable colours on terminal and SSH

My local Linux machine has coloured terminal output like this; When I SSH to a pfSense/BSD box it changes the colours like this; Even when I SSH from to a machine that doesn't have a coloured ...
7
votes
1answer
808 views

grep --color adds ANSI code ESC[K - This can change displayed text

Why does grep add ANSI code \e[K to its colored output? I can't see the point of it, but obviously the developers can. It is an ANSI/VT100 Terminal code which is used to "Clear line from current ...
7
votes
1answer
1k views

Get colors in less command with ccze: Shift + g doesn't go to the end of file?

In all the tools to get colors with less command: -R, Pygments, GNU Source-highlight, vless, ... ccze make me sastified with below command: ccze -A < /path/to/log/file | less -R but Shift+g ...
7
votes
1answer
313 views

How do I use colors in the MOTD?

I edited the default /etc/update-motd.d/00-header, adding some color to make it easier to read: printf "Welcome to \e[1;34m%s\e[0m \e[2m(%s %s %s)\e[0m\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" ...
7
votes
2answers
3k views

16 Colors in ZShell

I only seem to be able to call 8 colors in my zshell prompt. Example: PROMPT="[%n@%{$fg[magenta]%}%m%{$reset_color%} %.] %# " Works fine. However, ...
7
votes
1answer
529 views

Using dircolors, how do I change the color of my subversion folders

Below is a sample of my dircolors file, I want subversion folders (.svn) to be colored, but i guess the extension section only applies to file names. How do i set colors for directories with ...
7
votes
1answer
1k views

How can I list the available color names?

I'm trying to add some color to my git configuration and I want to know what color names are available on the terminal. I only want to use colors by name so it's easier for others to understand I ...
7
votes
1answer
2k views

Nested ssh session inside screen has no color

I am attempting to keep a nested ssh session inside of a byobu/screen window, which I also connect to over SSH with Putty on Windows. However the nested SSH session has no color. Here's what I'm ...
7
votes
3answers
616 views

Can I highlight the current prompt line in zsh?

Is it possible to highlight (set a background colour) for the whole line of the prompt in zsh? In my emacs config I have the line on which the cursor sits a slightly different colour to the window ...
7
votes
2answers
3k views

Terminal 256 colors don't work through Tmux [duplicate]

Possible Duplicate: Getting 256 colors to work in tmux I want to set my terminal to 256 colors. I normally use the Gnome terminal which is shipped by default in Ubuntu but I also downloaded ...
6
votes
5answers
3k views

How to create a testcolor.sh like the following screenshot?

I found this image on the internet, but don't know how was it made, Can anyone provide a sample on that? I just would like to have a color table as well.
6
votes
3answers
751 views

“Friendly” terminal color names in shell scripts?

I'm aware of libraries in languages such as Ruby and Javascript to make colorizing your terminal scripts easier by using color names like "red". But is there something like this for shell scripts in ...
6
votes
3answers
1k views

What are the color codes that I can use in my PS1 prompt?

I used several colors in my PS1 prompt such as \033]01;31\] # pink \033]00m\] # white \033]01;36\] # bold green \033]02;36\] # green \033]01;34\] # blue \033]01;33\] # bold yellow Where can I ...
6
votes
3answers
256 views

Are unix[-like] programs capable of determing where their output is going?

Up until recently I was under the impression that Unix-y programs were unaware of where their output went, be it to standard out, redirected to a file, or into a pipe. However, an unrelated U&L ...
6
votes
4answers
758 views

ls colors for permissions

Is there a way to control the color output of ls to highlight specific permissions on files? (e.g. write permissions). Any options in LS_COLORS that would do this? (the image above is from Dired+ ...
6
votes
1answer
1k views

Customizing bash shell: Bold/color the command

There are a number of tutorials/posts online (e.g. http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/) about how to customize your prompt in bash by ...
6
votes
2answers
379 views

Using empty line as context “group-separator” for grep

I need grep output with context, in color, and blank lines as group separator. In this question, I learned how to define custom group-separator, and I have constructed my grep command like this: grep ...
6
votes
2answers
2k views

Can I set my local machine's terminal colors to use those of the machine I ssh into?

I have a color scheme that I like for when I'm in a terminal, but I ssh into the machine I work on from multiple sources (locally, PuTTY, my netbook, etc.) and I want to maintain the same color scheme ...
6
votes
1answer
268 views

How to highlight logs with bash coloring on vim?

I have some nicely colored logs from some tools with bash color codes. When I view them through less or similar tools it get color rendered by bash (obviously). However it is pain to watch and edit ...
6
votes
1answer
1k views

tmux copy mode search highlight

Is there any way to highlight the searched term in tmux copy mode? Below is my tmux config: # remap prefix to Control + a set -g prefix C-a unbind C-b bind C-a send-prefix bind a send-prefix # ...
6
votes
4answers
2k views

Invert colours on Dual-Screen / Dual-Monitor setup?

In order to invert colours on monitor, I invoke: xcalib -invert -alter The problem is, that on Dual-Monitor setup it inverts colors only on first screen. I can not use Compitz gadgets for color ...
6
votes
1answer
1k views

tmux, Vim and Solarized

Premises Browsing around tmux, Vim and Solarized I can find lots of complains about 256 colours and "user experience". Well, I'm having the opposite "problem", i.e. Vim works well with a full ...
6
votes
1answer
553 views

What are the origins of rgb.txt?

Where did the list of X11 color names come from? Every resource I've found online claims the origin is unknown, but it must be recorded somewhere. The best information I've found was in an archived ...
6
votes
1answer
3k views

Color calibration on Linux Mint

I'm running Linux Mint 9. I installed Argyll and gnome-color-manager but neither of those have a GUI. I need to configure my monitor colors. Right now the white looks a little yellow etc. and I want ...
6
votes
2answers
784 views

emacs colors based on $TERM environment variable

I want to know if it is possible to make emacs, when running in a gnu screen or tmux session, use the same colors as when TERM=xterm. In a gnu screen or tmux session, TERM=screen and emacs uses a ...
6
votes
1answer
3k views

How to add color themes to Gnome-Terminal's GUI preferences?

I use Gnome-Terminal for a lot of my work, and like separating my windows by color based on the task that I'm doing, so I've set up several profiles using the Preferences GUI. I found some color ...
6
votes
1answer
2k views

Invert colors in whole PDF (convertion)

How to create pdf with inverted colours of original one? (Just like inverting whole screen with xcalib -i -a) Preferably : not loosing hyperlinks. But it's not requirement. It would be nice if ...
5
votes
4answers
3k views

vimdiff disable/enable color coding

Is there any way to quickly disable/enable color coding in vimdiff ? The problem is, I have colored text in vim and the text is invisible is the text-color is Red, and the vimdiff too tries to put a ...
5
votes
2answers
2k views

Colored man pages not working on gentoo

I have a problem using these methods to get colors in my man pages in gentoo. I've asked already in the gentoo forums but it still doesn't work, and the comments in a bug report (Bug 184604) don't ...
5
votes
2answers
466 views

bash: colorize second column of output

let's say, I have following output from ls: $ ls -lAhF /bin -rwxr-xr-x 1 root root 905K Apr 10 2010 bash* -rwxr-xr-x 3 root root 31K Dec 26 2011 bunzip2* -rwxr-xr-x 1 root root 505K Nov 15 2010 ...
5
votes
2answers
4k views

xterm colors are too bright

I've just started using dwm a couple days ago and I'm using xterm (uxterm) as a terminal emulator. However, I'm noticing that certain applications (like vi/vim, ls, and others) that output in color ...
5
votes
2answers
5k views

Colored Prompt in KornShell

According to this StackOverflow post, it is possible have a colored prompt in KornShell. I have not been able to figure out how to do this. I am able to use color: echo -e "\033[34mLinux\033[00m" ...
5
votes
4answers
2k views

Colored FIND output?

Is it possible to get colored output from the find command? That is, in the path of each found item, directories are blue, executable scripts are green, et cetera? I'm using version 4.4.2 of GNU ...
5
votes
3answers
665 views

How to disable styling on man pages?

Is there an easy way to turn off all styling on man pages? Colors, bold, italics, everything... If not, what is an uneasy way?
5
votes
2answers
148 views

How do I preserve coloured output when piping to `less -R`?

$ ffmpeg -v debug ... Coloured output. $ ffmpeg -v debug ... |& less -R Dull output. How do I make the output coloured while piping it to something?
5
votes
1answer
724 views

Non-printable-ASCII characters in sshd banner

It's possible to configure a banner for sshd that is to be displayed as a connection is opened, via Banner /etc/motd.ssh in sshd_config. Note that this is displayed before the authentication occurs, ...
5
votes
2answers
1k views

is there a way to set coloring for cd tab complete?

I use ubuntu 11.04. Is there a way to set coloring for output after tab completion listing of a cd, ls, or etc. ? i.e. myshell@root$ cd ~/user/files/ I hit tab... myfile myfoo mybar <-- this ...
5
votes
2answers
114 views

How would I add a prefix to input I receive from a pipe via awk and color the prefix conditionally?

Is there a way to add a prefix to lines received (and filtered) via awk - yes I know that's possible so far - and then conditionally (e.g. based on the existence of the $PS1 variable of the ...
5
votes
2answers
3k views

Change colors in console/virtual terminal

Is there a way to alter all the available colors in console / virtual terminal? By console, I mean what you get after pressing CTRL + ALT + F1 and not anything like xterm or urxvt. So, I guess that ...
5
votes
3answers
150 views

Getting unexpected colorized output on several commands

I just added this to my .bashrc to get colorized output with less: # Colorize less man pages. export LESS_TERMCAP_md=$'\e[01;34m' export LESS_TERMCAP_us=$'\e[01;33m' export ...
5
votes
3answers
192 views

Coloring output of forked processes

I have a runscript that starts some processes and sends them to the background mongod & pid_mongo=$! redis-server & pid_redis=$! # etc. All these processes then output concurrently to ...
5
votes
1answer
1k views

GNU screen color and pine

I use GNU screen to run pine mail reader. I use external aspell to do spellchecking for the e-mails I sent. The problem is that when aspell finishes, pine restores the old content of the terminal, but ...
5
votes
1answer
971 views

Is it possible to use named colors in Zsh beyond ANSI names?

I know there are ways to use ANSI color names in Zsh (such as red), but Zsh supports 256 colors by number. I'm curious if there's any way to refer to the non-ANSI colors by a name? (Without just ...
5
votes
2answers
2k views

how to make XTerm never use bold characters?

I am trying to make XTerm to never use a bold font, and nothing seems to work. I put settings in ~/.Xresources and then run xrdb ~/.Xresources and then start a new XTerm. This is what I try: ...
5
votes
1answer
235 views

Linux VT Emacs in tmux, breaks color and cursor

TERM is set to screen. I tried with screen-256color, but then the colors went really nuts. I also tried xterm, linux, and some others (that I could think of, not really thinking) but screen is the ...
5
votes
1answer
114 views

How to colourise hidden files in `ls` file listings?

LS_COLORS environmental variable lets you decide on colours for different file types for ls command, such as, directories, regular files, links etc. I suppose that dot files are considered a variation ...
4
votes
3answers
846 views

Prevent watch breaking colors

I'm altering scripts at work that monitor log files to single out certain items and colorize them. The final output is a list of 6-digit numbers in several columns. I've been able to add a ~ to the ...