0

Refer to a comment here I wanted to ask to the poster the question where to copy the .bashrc file to. Because copying it to the home of the user does not enable the auto color ls command.

Please, can someone also tell me how to raise comments on a post if you do not have 50 reputation points yet?

user30994
  • 101
  • 2
  • what do you mean by home? What is the full path of the file now? – Zanna Mar 31 '18 at 06:55
  • /home/username is the home directory. – user30994 Mar 31 '18 at 11:03
  • what's the output of alias? What version of Ubuntu are you using? When did the colours disappear? Is this your local system or are you accessing via SSH? – Zanna Mar 31 '18 at 11:06
  • Here are all your replies.
    1. alias does not give any output.
    2. It's Ubuntu 14.04.
    3. It is hosted on AWS.
    4. I am using ssh.
    5. Colors work fine when I su to a user who is in sudoer list.
    6. This started happening when I enabled an existing user on ssh. Earlier when I used to su the shell loaded allowed bash history which also stopped now. I enabled bash history by running this command [https://askubuntu.com/a/325812/671438]
    – user30994 Mar 31 '18 at 14:55
  • Apologies, I don't get it. What is alias to do with this? I donot have a high skill on Linux. Could you please be a little specific what I have to do. – user30994 Mar 31 '18 at 15:38
  • Oh sorry. The ls colours appear by default because of an alias in your .bashrc which is only read by interactive shells. I don't really know about SSH, less about AWS, but the shell you are using is not reading .bashrc for some reason. I don't know how to make that happen (that's why I'm not answering your question) but as a workaround you can set the alias yourself or just run ls with the option ls --color=auto – Zanna Mar 31 '18 at 16:05
  • so when you SSH, are you root? You may need to edit root's .bashrc on the remote system – Zanna Apr 01 '18 at 08:28
  • No I don't ssh as root. I'm in fact sshing as a user who is not in sudoer list. So after she I do a su to another user who in turn has the power for sudo. Also this other user is able to 'ls' files with auto color. – user30994 Apr 01 '18 at 19:25
  • so, the user you SSH to I guess does not have this alias in their .bashrc... did you cp the /etc/skel/.bashrc file to that user's home directory? – Zanna Apr 01 '18 at 19:30

0 Answers0