Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am very new to Linux. Having said this, I had a friend go on my RHEL machine and he somehow added a few random lines in a file, which will post every time I have completed a command. I am not sure what file he added it to, but I'd like to remove these messages, so I don't have to see them any longer, as they appear every stinkin' time I finish a command.

share|improve this question
2  
sounds like something in "~/.bashrc". can you give us some more information? maybe what does it say, so that we could imagine, what for your friend has added those lines. maybe directly post your "~/.bashrc"-file to ab paste-bin or something similiar. –  xx4h Feb 14 '13 at 6:57
2  
Is the PROMPT_COMMAND shell variable set? –  manatwork Feb 14 '13 at 8:15

1 Answer 1

You might want to check the following files for changing or setting of PS1 variable:

  • /etc/profile
  • ~/.bash_profile
  • ~/.bash_login
  • ~/.profile
  • ~/.bashrc

Here, "~" denotes your home directory, /home/user32350/, for example, or /root/. You may print it out echo echo ~ or quickly change to it by cd without parameters. Please note that the files with names starting with a dot (4 of those listed above) are usually hidden from the list. You will need -a switch added to your ls command to see them (e.g., ls -l -a).

share|improve this answer
    
Just search for (part of) the message in there: grep "message" /etc/profile, etc. –  vonbrand Feb 14 '13 at 13:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.