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:~# 
Asked By: Suhairi Suhaimin

||

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:~# 
Answered By: falsetru

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 ~

Answered By: Abdel-Raouf

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.

Answered By: bySamo

If you are in root and want to go back in the simple user you can try typing "exit"

Answered By: user21070019
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.