Before we start lets locate the folder:
realpath virtualenvs
realpath .virtualenvs
Now assuming you get a return of /home/.virtualenv
from option 2(again assuming it was actually a hidden folder), then we need to move it to the proper place which aught to be in /home/$USERNAME
or /home/daniel
in your case.
We do so by typing this in the terminal:
mv /home/.virtualenvs /home/daniel/
But if it returns /home/virtualenvs
, then the folder isn't hidden and should be moved thus:
mv /home/virtualenvs /home/daniel/
NOTE: If not hidden run through the answer without the .
before every occurrence.
Now you access hidden folders from the terminal like any other, except you have to add the .
character before the name. Now in your case the fault is that you did not add the exact location of the virtualenvs
folder.
Say the virtualenvs
folder is in our /home
directory ( as we had moved it there ) then to get at it from the terminal we will put it this way:
cd /home/$USERNAME/.virtualenvs
Now note two things here:
We used the absolute path to get to it
We inserted the _environmental variable %USERNAME
into the path. We could easily have inserted or used daniel
if that is the name Ubuntu knows you by. In which case we would have had it like this:
cd /home/daniel/.virtualenvs
Now to see where your virtualenvs
folder is run:
realpath .virtualenvs
This will return the path location of that folder which you will then use with the cd
command to enter into it.
Absolute and Relative Paths:
Now let me try to explain this so you won't need to always type /home/daniel/.virtualenvs to get into .virtualenvs
folder.
Relative Paths:
If I typed pwd
and the result was /home/daniel
. That means I am sitting or located in /home/daniel
and when I type realpath .virtualenvs
then also get the result /home/daniel/.virtualenvs
then to get into virtualenvs
( which if you also is in /home/daniel
) I will type:
cd .virtualenvs
Now this is the relative path, i.e. in relation to where I currently am.
Absolute Paths:
If I don't know where I am, but know that the .virtualenvs
folder is in the /home/daniel
as seen when we use realpath .virtualenvs
command. Then I will use the absolute path to get to it with:
cd /home/daniel/.virtualenvs
Or if I type pwd
to know where I was in the filesystem
and I get a result like: /usr/lib
then to get to .virtualenvsthe absolute path will be need as the relative path won't get me there. So from location
/usr/lib` I would type:
cd /home/daniel/.virtualenvs
Now another important note is the use of ~/
in place of /home/daniel
. This can be used to avoid typing the full /home/daniel
, so for the absolute path to .virtualenvs
I would have typed:
cd ~/.virtualenvs
and this would have got me there.
terminal
, if you're currently at your home directory (/home/daniel) thencd .virtualenvs
will work, as .virtualenvs is a sub-directory of /home/daniel. IF HOWEVER, the path you show is correct, then you'll need tocd /home/.virtualenvs
to get there. Note that/home/.virtualenvs
would not be a normal place to put the .virtualenvs directory.