Score:0

CLI Accident: Hit '&' and now it's appended to folder names

kh flag

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!

Raffa avatar
jp flag
Your system is okay ... You have just sent a job to the background with `cd /etc&` which obviously ended instantly ... As for the `$`, [this is how the prompt usually looks](https://www.howtogeek.com/wp-content/uploads/2013/03/linux-terminal-on-ubuntu.png?width=1198&trim=1,1&bg-color=000&pad=1,1)
Score:5
cn flag
raj

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.

Raffa avatar
jp flag
.... raj ... +1
user1608347 avatar
kh flag
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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.