Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have two machines both centos 4.7. When I log in to one of them through Putty(SSH) it has display in color, directories are blue, executables are green, if you edit file in vi comments are one color ... commands other and so on. Really cool I like it. They other machine is just plain monochrome. I can't figure out where is set. I thought .bashrc is place to set stuff like this but ... there are absolutely the same.
Weird thing is that I installed both machines and never did anything like that, so I don't know why they are set different?
For color in vim you need to edit /etc/vim/vimrc. Just find the line that says
Code:
#syntax on
and uncomment that line (delete the #). If that line is not in the file just add "syntax on" somewhere in /etc/vim/vimrc. You will have to be root to write to this file.
For others who may read this, is there a way to have a custom vimrc for each user? I read somewhere that you could just create a ~/.vimrc but I tried that and it still uses the /etc/vim/vimrc.
Those two lines were command that you type in at the shell.
All they do, is add the line
Code:
alias ls='ls --color=auto'
to the .bashrc file in the user's home directory and "source" the .bashrc file so the changes take effect immediately - ie. you don't need to log out and log back in.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.