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.
- 69,223
- 56
- 216
- 327
-
1~ is short hand for /home/your_user . This has nothing to do with "putting php file in var/www/html" See https://askubuntu.com/questions/46331/how-to-avoid-using-sudo-when-working-in-var-www – Panther Sep 27 '17 at 02:07
-
i can't saved file in the folder /html, so that i will make the permission be writable but the terminal is into ~ not / – Mark Joshua Fajardo Sep 27 '17 at 02:17
-
@M.Faire just do `cd /` – cygnus_x1 Sep 27 '17 at 02:28
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.
- 100,877
- 19
- 193
- 283