-bash: cd: Desktop: No such file or directory
Solution 1
The /root
directory is the home directory of the root
user. This user doesn't have a Desktop
by default since root isn't supposed to log in graphically, so you are getting that error simply because you are trying to cd
into a directory that doesn't exist.
If you want to cd
into your desktop, try:
cd ~/Desktop
Although, if you are in /root
, you are probably logged in as root, so that won't work either.
Solution 2
try this (user account):
cd $(xdg-user-dir DESKTOP)
Solution 3
If you are running it from /root then you are running it with root privilages. That means you are not an ordinary user and your default directory ~ will be /root. You are probably logged in as root. So you should log in with another user or you can just go (supposing your default is /root and from /root) cd /home/{your_username}/Desktop/
.
Related videos on Youtube
Malicious
Updated on September 18, 2022Comments
-
Malicious over 1 year
I'm trying to type:
cd Desktop
from the
/root
directory, but when I do it comes up with the error:-bash: cd: Desktop: No such file or directory
What am I doing wrong?
-
terdon almost 5 yearsWhere are you running this command from? What is the output of
pwd
? And what is the output ofls -ld Desktop
? -
Malicious almost 5 yearsI'm running it from /root
-
FedKad almost 5 yearsNormally root user's home directory is
/root
, but it will not contain aDesktop
directory because root user is not and should not be used to login into desktop. -
Malicious almost 5 yearsWhat should I do then?
-
terdon almost 5 years@Malicious depends. What do you actually want to do? Why do you want to
cd
into/root/Desktop
? -
Malicious almost 5 yearsI'm trying to get the files I installed to end up in my Desktop.
-
terdon almost 5 years@Malicious you don't want to install things on your Desktop, they wouldn't work. It's probably best if you ask a new question, starting from the beginning. Explain what you have done (what and how did you install), and what you are trying to do. If you just want an icon on your Desktop that you can click on to launch something, that can be done, but we need to know the while situation.
-
Malicious almost 5 yearsI'm trying to get this thing from git called cupp into my desktop so I can access the wordlists.
-
-
Malicious almost 5 yearsThat doesn't work either.
-
terdon almost 5 years@Malicious yes, of course it doesn't work. As I explained in the answer, there is no
/root/Desktop
directory. And, as I also mentioned, if you are in/root
, then you are probably logged in as the root user so~/Desktop
will also not work because that will be expanded to/root/Desktop
. You cannotcd
into a directory that doesn't exist. -
Malicious almost 5 yearsI tried the commands and it said when I typed cd /root/Desktop/ it said -bash: cd: /root/Desktop/: Permission denied what do I do?