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.
hello y'all, back to my regular need. after i made the change to my shell type, that from SH to TCH, and back again, i lost my coloring for my file system, if you know what i mean, folders always come in blue, and devices in yellow hope you understand? now everything i do can't seem to differentiated between files colors anymore. need help pls. thanks . hope to read from you guys soon
hello y'all, back to my regular need. after i made the change to my shell type, that from SH to TCH, and back again, i lost my coloring for my file system, if you know what i mean, folders always come in blue, and devices in yellow hope you understand? now everything i do can't seem to differentiated between files colors anymore. need help pls. thanks . hope to read from you guys soon
I believe directory, pipes, files and such, are colored by the .dircolors file in the home directory. If that file isn't there, it might be causing the issue.
When you start a shell, several scripts get run before you gain control. One of those sets aliases and environment variables instructing ls how to color things.
The easiest way? (1) Don't start a new sh session. Instead close the tch session and the original shell will be waiting for you. "exit" or ctrl+d will end a session.
Method (2) don't run sh. Run bash instead. Almost every system today runs bash instead of sh. In fact, sh is usually an alias for bash (in an sh compatibility mode). There are things bash runs (and sets up) that sh (or bash being run as sh) doesn't.
(sh is the Bourne Shell; bash is the Bourne Again Shell. Tacky acronym, but memorable )
(3) Run the login script directly to restore the missing environment elements. On my Debian system, this seems to take place in ~/.bashrc . I suggest:
Code:
source ~/.bashrc
or
Code:
. ~/.bashrc
(same thing)
Other files that might be involved include /etc/profile, ~/.bash_profile, ~/.bash_login, ~/.profile, and /etc/bash.bashrc
This all depends on which distribution you're running, and how the maintainers choose to set these up.
hello yeah got all that and really know how its works. forgot to mention, i created a new .bashrc in my home directory, and i have to put back everything in it. all i need now is the leeter or script or maybe command i have to put into my bashrc to get my file coloring back. and thanks to gd2hoe for the help. note am a redhat linux user. thanks again.
hello yeah got all that and really know how its works. forgot to mention, i created a new .bashrc in my home directory, and i have to put back everything in it. all i need now the line to add into my bashrc to get my file coloring back. and thanks to gd2shoe for the help. note am a redhat linux user. thanks again.
hello yeah got all that and really know how its works. forgot to mention, i created a new .bashrc in my home directory, and i have to put back everything in it. all i need now the line to add into my bashrc to get my file coloring back. and thanks to gd2shoe for the help. note am a redhat linux user. thanks again.
Code:
LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:'
alias ls='ls --color=auto'
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.