Joined: 19 Nov 2002 Posts: 4 Location: Washington DC
Posted: Thu Jan 23, 2003 3:19 am Post subject: color coding things in linux / php question
IN console it would help a bunch if you can color code different things like in ls if directories would be a different color that would be much easier to understand. They have it in mandrake and its pretty cool. How to do it in debian?
Second question is that I just installed apache with php (with which i had problems earlier) and when i make a small php scritp and go to it throught my windows box, it asks me to download it. And it doesn't execute it, how come?
Joined: 18 Apr 2002 Posts: 16777215 Location: Kuala Lumpur, Malaysia
Posted: Thu Jan 23, 2003 11:49 am Post subject:
Q: How do I get colors for 'ls'?
A: This assumes that you use bash, the standard shell in Debian. First check your ~/.bashrc, the necessary commands are probably already defined, but commented out (the have a # at the beginning of the line).
Remove that # in the line that says
alias ls='ls --color=auto'
If it doesn't exist, just add it. Feel free to comment out some of the other things in it, if you think you might like them. The next step is to make sure that all shells you start make use of that file. To achieve this, you have to edit your ~/.bash_profile and either add or uncomment
if [ -f ~/.bashrc ]; then
After you did that, run the following command in all already open shells:
This will reread that file and add the alias to the running shell. If you are interested in other useful things you can do with that files, 'apt-get install bash-doc' and read /usr/share/doc/bash/examples/startup-files
2) You have php installed, but you don't have Apache set to use it and you might not have chmod +x it.
Google for "Using PHP with Apache" +Debian or something
P.S. Both of these questions can easily be answered with Google.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum