LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ls and colours when listing (https://www.linuxquestions.org/questions/slackware-14/ls-and-colours-when-listing-127907/)

destin 12-21-2003 06:31 PM

ls and colours when listing
 
i remember i created a softlink pointing at /bin/sh and after i removed it when i give "ls" i don't get folders showing up in blue or executables showing up in green.How can i fix that ?!

synaptical 12-21-2003 06:36 PM

i put an alias in my ~/.bashrc and that worked:

# User-defined section
alias ls='ls -F --color'

just do "source ~/.bashrc" after you change it.

destin 12-22-2003 08:46 PM

tnx.
And how do i get to see:
$user@$domain$workingpath (e.g. user1@user1domain~$) instead of -bash-$version (e.g. -bash-2.04$)

synaptical 12-22-2003 10:26 PM

you put that in the .bashrc, too (or /etc/profile sometimes). here's a tutorial that covers it all pretty well:
http://www-106.ibm.com/developerwork.../l-tip-prompt/

core 12-23-2003 01:59 AM

make your bashrc like this:
Code:

echelon@core:~$ cat .bashrc
alias pico=nano
alias ll='ls -lh'
alias la='ls -Alh'
eval `dircolors`

and create a symlink called .bash_login that points to your bashrc:

Code:

echelon@core:~$ ll .bash*
-rw-------    1 echelon  users        8,9K 2003-12-23 07:58 .bash_history
lrwxrwxrwx    1 echelon  users          7 2003-12-12 12:30 .bash_login -> .bashrc
-rw-------    1 echelon  users        878 2003-12-12 12:28 .bashrc
echelon@core:~$


kc00l 12-23-2003 06:43 AM

Quote:

Originally posted by destin
tnx.
And how do i get to see:
$user@$domain$workingpath (e.g. user1@user1domain~$) instead of -bash-$version (e.g. -bash-2.04$)

As synaptical adviced, follow that link and if you want to learn more, read the:
Bash Prompt HOWTO

Anyway add this to your ~/.bashrc

export PS1="[\u@\h \w]\\$"


All times are GMT -5. The time now is 10:43 PM.