How to return to default linux root (Home) folder in terminal?
Question:
I’m new to linux and python. I’m just thinking can i go back to default root folder (Home) from terminal, and not by closing and reopen the terminal.
After activating the folder:
root@root:~/anaconda2# source bin/activate ~/anaconda2/
discarding /root/anaconda2/bin from PATH
prepending /root/anaconda2/bin to PATH
I get:
(/root/anaconda2)root@root:~/anaconda2
Then i run the ipython notebook and after finish my work and shutdown, i returned back to:
(/root/anaconda2)root@root:~#
How can I get back my root folder (Home):?
root@root:~#
Answers:
You’re already back to home directory.
Maybe you meant deactivate
the virtualenv? Issue deactivate
or source deactivate
:
(/root/anaconda2)root@root:~# source deactivate
root@root:~#
Whenever you want to go back from sub-directory to parent directory use ..
or change the working directory to user’s home directory use cd ~
Hmm why are you using root
in first place?
If you are doing it for avoid use sudo
It’s a bad idea.. you need to have control what things are you installing with root privileges or not.. If you are logged in with root.. well you are installing all with root privs. when it’s not necessary. And It’s not recomend it for security reasons mostly.
for go back to your root folder.. did you try just run cd
? is that what you want?
The reason that your home directory is /root is because you are using the root user. You need to create an user on Kali to use the /home/username.
If you are in root and want to go back in the simple user you can try typing "exit"
I’m new to linux and python. I’m just thinking can i go back to default root folder (Home) from terminal, and not by closing and reopen the terminal.
After activating the folder:
root@root:~/anaconda2# source bin/activate ~/anaconda2/
discarding /root/anaconda2/bin from PATH
prepending /root/anaconda2/bin to PATH
I get:
(/root/anaconda2)root@root:~/anaconda2
Then i run the ipython notebook and after finish my work and shutdown, i returned back to:
(/root/anaconda2)root@root:~#
How can I get back my root folder (Home):?
root@root:~#
You’re already back to home directory.
Maybe you meant deactivate
the virtualenv? Issue deactivate
or source deactivate
:
(/root/anaconda2)root@root:~# source deactivate
root@root:~#
Whenever you want to go back from sub-directory to parent directory use ..
or change the working directory to user’s home directory use cd ~
Hmm why are you using root
in first place?
If you are doing it for avoid use sudo
It’s a bad idea.. you need to have control what things are you installing with root privileges or not.. If you are logged in with root.. well you are installing all with root privs. when it’s not necessary. And It’s not recomend it for security reasons mostly.
for go back to your root folder.. did you try just run cd
? is that what you want?
The reason that your home directory is /root is because you are using the root user. You need to create an user on Kali to use the /home/username.
If you are in root and want to go back in the simple user you can try typing "exit"