Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 114578  / 1 Year ago, thu, march 9, 2023, 6:54:49

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.


More From » directory

 Answers
6

Welcome to Ubuntu.


From home to enter brian2 from /home/, type in terminal


cd ./brian2

or simply,


cd brian2

When 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.


[#28251] Friday, March 10, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
armis

Total Points: 38
Total Questions: 106
Total Answers: 118

Location: Mali
Member since Sat, Feb 12, 2022
2 Years ago
;