Score:0

-bash: cd: root: no such file or directory

lc flag

I run these commands step by step:

rakinar2@hotspot:/$ ls -CF
bin@ boot/ cache/ dev/ d/ data/ etc/ home/ mount/ opt/ root/ sbin/ sys/ usr/
rakinar2@hotspot:/$ ls -hal root
total 16K
drwxr-xr-x  2 root root 4.0K Jul 16 16:39 ./
drwxr-xr-x 13 root root 4.0K Jul 16 16:39 ../
rakinar2@hotspot:/$ cd root
-bash: cd: root: no such file or directory

How do I fix this error and go to the /root directory?

Artur Meinild avatar
vn flag
Only root can enter the directory `/root`, so you need to [switch to root user](https://askubuntu.com/questions/889413/how-to-switch-to-root-user-but-stay-in-the-same-directory).
pLumo avatar
in flag
@Artur But it is still the wrong error message then... Should show `Permission denied`
pLumo avatar
in flag
@ArRakin, which Ubuntu version?
Artur Meinild avatar
vn flag
Agreed - but I'm curious what gets displayed if he tries as root.
pLumo avatar
in flag
But it should show `Permission denied` for the second command already. I somehow think that OP is not on Ubuntu.... The directories do not match. No typical directories like `cdrom`, `media`, `proc`, `run`, `tmp`,`var`, etc.
hr flag
@pLumo agreed - they [previously posted](https://askubuntu.com/questions/1351819/bash-sh-command-not-found) that their system doesn't have a `/bin/sh` or `/bin/dash` among other discrepancies.
lc flag
@pLumo Version Bionic
pLumo avatar
in flag
Somehow it seems you changed a lot of things in your system, also regarding your previous question. I doubt we can help you rather than recommend a reinstall.
lc flag
@pLumo I am trying to reinstall a fresh version of ubuntu.
lc flag
@pLumo Now the system works fine, thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.