0

I was a bit too fast just now and instead of typing 'cd /etc/' I typed 'cd /etc&' and then hit Return before I could stop myself rolling eyes

Now all the folder names have a $ appended to them: '/home$'.

What does it do, and how do I make it go away?

Thanks in advance!

1 Answers1

5

There is nothing wrong and you don't have to do anything. $ is the character that by default is always at the end of terminal prompt (it can be changed in the configuration, but by default it's always there).

You are probably confused by the fact that once you changed the current directory, the directory path appears in the prompt just before $. This is again due to how the default prompt is configured. In Ubuntu, the default prompt contains:

username@hostname:directory$

where username is your username, hostname is the name that has been assigned to your computer while installing Ubuntu, and directory is the path to current directory.

Initially when you login, you are in your home directory, which is indicated simply as ~, so your prompt looks like for example that:

raj@ubu64:~$

But once you change your current directory, for example by typing cd /home, an actual path to the directory starts to appear in place of ~, so it looks like:

raj@ubu64:/home$

There's nothing wrong with that. This is just how the default prompt in Ubuntu looks like.

If you return to your home directory, by typing either just cd, or cd /home/username where username is your username, the prompt will again return to the initial form:

raj@ubu64:~$

Hope this clarifies the situation to you.

raj
  • 11,504
  • .... raj ... +1 – Raffa Jun 21 '23 at 12:15
  • Thanks a lot! I'm a little baffled why I hadn't noticed that already. I'm no expert here (obviously) but I'm not supernew to this either.

    Well, I guess it's back to work, now that the Universe is in order again. :-D

    – user1608347 Jun 21 '23 at 12:49