LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-21-2003, 06:31 PM   #1
destin
LQ Newbie
 
Registered: Dec 2003
Distribution: SlackWare / NetBSD
Posts: 24

Rep: Reputation: 15
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 ?!
 
Old 12-21-2003, 06:36 PM   #2
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 46
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.
 
Old 12-22-2003, 08:46 PM   #3
destin
LQ Newbie
 
Registered: Dec 2003
Distribution: SlackWare / NetBSD
Posts: 24

Original Poster
Rep: Reputation: 15
tnx.
And how do i get to see:
$user@$domain$workingpath (e.g. user1@user1domain~$) instead of -bash-$version (e.g. -bash-2.04$)
 
Old 12-22-2003, 10:26 PM   #4
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 46
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/
 
Old 12-23-2003, 01:59 AM   #5
core
Member
 
Registered: May 2003
Location: Berlin
Distribution: Slackware 9.1 Kernel: 2.6.4
Posts: 60

Rep: Reputation: 15
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:~$
 
Old 12-23-2003, 06:43 AM   #6
kc00l
Member
 
Registered: Oct 2003
Location: France/Italy
Distribution: Slackware Current
Posts: 83

Rep: Reputation: 15
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]\\$"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use colours in c++ ? twirl Programming 3 10-05-2005 10:09 PM
Colours in directory listing and XMMS Output plugins Kristijan Linux - Newbie 3 02-22-2004 07:21 AM
bash colours devinWhalen Linux - Newbie 6 12-02-2003 10:49 AM
Turn off colours ballus Linux - Newbie 5 08-12-2003 03:12 PM
Colours in Konqueror joseamuniz Linux - Software 0 05-26-2003 08:56 PM


All times are GMT -5. The time now is 02:48 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration