I do not know what ~$
or /$
mean in terminal. But, I really need to change my terminal from ~
to /
. To change a folder permission, for putting a php file in var/www/html
. Maybe there is an easy way to change ~
to /
in terminal.

- 70,465
1 Answers
I can see you are both new and frustrated.
By default when you open a terminal or log in you will be in your home directory, /home/your_user_name, or ~ for short.
You can always return with cd ~
You can change directories with the cd
command, for example, cd /
or what have you.
Understand the difference between relative and absolute directories.
From home, or ~ you can cd into documents with the relative path
cd Documents
or absolute path
cd /home/your_user/Documents
or with ~
cd ~/Documents
but you are asking about system files or things outside $HOME. For that you typically need root powers.
BUT for /var/www/html see the link I gave you : How to avoid using sudo when working in /var/www?
For additional information see :
https://help.ubuntu.com/community/FilePermissions
https://help.ubuntu.com/community/RootSudo
This is also a very helpful resource: https://cfhcable.dl.sourceforge.net/project/linuxcommand/TLCL/16.07/TLCL-16.07.pdf
dont be overwhelmed by the length of the document, it goes fast, and you may need to read only the first chapter or two.

- 102,067
cd /
– cygnus_x1 Sep 27 '17 at 02:28