Newbie mistake on Terminal. Advice?

Hello TOP learners; thank you for this wonderful resource!

I’m new to coding and made a mistake on terminal by renaming my tilde/‘Home’ folder ‘Mkdir’. There isn’t anything online about such a beginner mistake but, I’ve no idea how to change this back. How can I change the name of my home folder to ‘~’? Did I mess up anything serious?

Thank you for your time,

Hi, can you post the command you think change the name. Pressing keyup you can access to the previous commands in the terminal. I supose that should be some like sudo mv …

Also open a new terminal (isnt needed to close the previous) and run the command pwd and tell us whats the output.

Thank you for the reply. My apologies but the typo is ‘myfolder’ not ‘mkdir’. So, here’s the terminal:

On line 11 I typed ‘cd myfolder’
On line 12 instead of a tilde it says ‘myfolder’
On line 14 I try to remove ‘myfolder’. It says ‘no such directory’
Is all I need to do : ‘cd ~’ or is it more serious?

This is my first week coding - thanks in advance!


this is because in your current position there is no folder named myfolder. The rm comand expect the name of the folder you want to delete, but only if the folder is in the same direction as your terminal.

The problem seems to be that myfolder is in ~, because you run the comand mkdir in ~
Then you move inside myfolder with cd myfolder.
But inside myfolder there is no myfolder to delete so the comand rm doesnt work.
If you want to delete myfolder you must run the command in ~

So how to position your terminal in ~ ?


this go back to ~ also if you dont want to go back to the beginig use the command

cd ..

this go back to the previous directory. In this case both work.

If you are lost you can do


that print the working directory, and tells you in wich directory you are, and


that the files and folders in your current position.

If there is another doubt ask again.
Hope this will help.

it worked! Thank you :slight_smile: