I'm a total newbie to Ubuntu and Linux and I'm struggling to even navigate to folders. The below often happens -
brian2@ubuntu:~$ cd /home/
brian2@ubuntu:/home$ cd /brian2
bash: cd: /brian2: No such file or directory
brian2@ubuntu:/home$ l
brian/ brian2/ fslyne/ testuser/As you can see from the above I'm trying to go to the folder brian2 but Ubuntu tells me No such file or directory but the directory list command tells me it is there.
2 Answers
Welcome to Ubuntu.
From home to enter brian2 from /home/, type in terminal
cd ./brian2or simply,
cd brian2When to say cd /brian2, it tries to navigate the folder at / but there is no folder brian2
Further Clarification as you asked in your comment
Christian Mann aptly said it, tilde ~ refers the same thing as /home/brian2 in your case.
~ refers to home for any user. For example,
For brian ~ refers to /home/brian
For brian1 ~ refers to /home/brian1 so on.
If brian1 enters to brian's home (have to have permission) he will see at prompt
brian1@ubuntu:/home/brian$In Linux always you can modify things. There is a special shell variable PS1 which can modify the shell prompt in different ways as you wish.
/brian2 doesn't exist. /home/brian2 does exist. If you are already inside /home then you simply need to run cd brian2 to get into that directory. If you are already that user, then cd will switch to your home directory, when you run it without arguments.