Can't change directories in Linux Mint
I want to do a simple CD and this is what I get. I can't change into any directory, which should be straightforward.
alan@alan-Inspiron-5537 ~ $ pwd /home/alan alan@alan-Inspiron-5537 ~ $ ls Desktop Documents Downloads Music Pictures Public Templates Videos alan@alan-Inspiron-5537 ~ $ su root Password: alan-Inspiron-5537 alan # pwd /home/alan alan-Inspiron-5537 alan # ls Desktop Documents Downloads Music Pictures Public Templates Videos alan-Inspiron-5537 alan # cd /Downloads bash: cd: /Downloads: No such file or directory alan-Inspiron-5537 alan # cd /music bash: cd: /music: No such file or directory alan-Inspiron-5537 alan # cd /Music bash: cd: /Music: No such file or directory alan-Inspiron-5537 alan # |
Try changing directory 'without' the forward slash:-
Code:
cd Downloads |
IF the above doesn't work;;;;;
Use 'reset' to reset your terminal when it gets messed up by control sequences. |
Quote:
The pwd command gives you your Present Working Directory. As you saw, it was /home/alan. Now you should understand the Linux filesystem standard a little bit. The root of the filesystem is /. "/" actually is a directory. And if you do Code:
cd / When you are doing Code:
cd /Downloads The directories you are looking for are under /home/alan. So, you should either be in /home/alan and do Code:
cd Downloads Code:
cd /home/alan/Downloads Code:
echo $HOME |
Got it
Thanks. I got into the directory and got the program installed.
|
|
Quote:
Glad it worked for you. Don't forget to mark your thread SOLVED. |
if your in the base dir to me meaning that if you ls and get the reading such as this.
Code:
userx@Voided.1 & ~ >> $ls Code:
userx@Voided.1 & ~ >> $cd Documents Code:
userx@Voided.1 & Documents >> $su Code:
sh-4.3# cd |
When you start a path with the forward slash it implies it is a full path and not relative, so it was actually looking for a folder right in / called Downloads. What you probably wanted to do is ../ which means "go back one folder" So say you are in Documents and Downloads is in the same folder as Documents, you would do cd ../Downloads to move to that folder in one command. Alternatively you can do cd .. to go back one folder then cd to Downloads (no slashes).
|
All times are GMT -5. The time now is 03:41 AM. |