Announcement

Collapse
No announcement yet.

Can't enter /root directory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Post-Install] Can't enter /root directory

    I'm trying to enter /root directory.

    user@user-tobefilledbyoem:~$ sudo cd /root
    [sudo: authenticate] Password:
    sudo: 'cd': command not found
    user@user-tobefilledbyoem:~$ sudo cd /root
    sudo: 'cd': command not found


    Also I am triying to enter this folder by Thunar, but system wrote:

    Failed to open directory "root".
    Error opening directory "/root": Permission denied.


    Can you explain to me how I can get access to folder /root.

    #2
    Originally posted by trvatrva View Post
    user@user-tobefilledbyoem
    This may be a factor here, Not familiar with OEM install and post-install setup, I have never actually done one, or needed/wanted to over the decades.

    Maybe more details about where in the setup/install process you are, and why you need to access the /root ( the so-called root user account's homedir) dir , or do you really mean to access the system root (just "/"?),

    You should not need to access /root in *buntu, it really is not used, but you also should not need sudo to access " / "

    So more info about what you are trying to do, things like that. Are you in the live session still, or the initial post-install session before the end user receives the computer and sets up their user account, etc?

    If you really need to access /root then use sudo -i to switch to a root shell, then use cd to move there - no sudo needed. Type exit when you are done here.
    You can do big harm in this session if you are not careful.
    Last edited by claydoh; Yesterday, 07:34 AM.
    Self-built: Asus PRIME B550M-K/Ryzen 5600GT/32Gb/Intel ARC B580 12Gb/KDE neon
    HP Elitedesk 800 G3 Mini: i5-7500T(35w)/32Gb/Kubuntu LTS
    HP Chromebook 14: i5-1135G7/8Gb/512Gb SSD/KDE Linux

    Comment


      #3
      To address your question directly cd is not an executable, it's a "built in" command of your shell. sudo only runs executables. You could run
      Code:
      sudo ls /root
      Or, more dangerously, become root
      Code:
      sudo -i
      cd /root
      But claydoh's remarks apply, "what are you trying to do?"
      Regards, John Little

      Comment


        #4
        There isn't a /root directory. 'root' directory is just / so cd / is what is required.
        Slava Ukraini! 🇺🇦
        Windows no longer obstruct my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Really? All my systems have a /root folder...

          Please Read Me

          Comment


            #6
            Just to (try to help) clarify ...

            cd /root
            bash: cd: /root: Permission denied

            ​OK, then

            cd /
            ls
            bin cdrom etc lib lib64 lost+found mnt proc run snap sys usr
            boot dev home lib32 libx32 media opt root sbin srv tmp var

            So now get in to root:
            ​cd root
            bash: cd: root: Permission denied

            Oops! This where claydoh and jlittle are telling you that you need to
            use sudo if you actually want to get into root to see what's there.



            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Originally posted by oshunluvr View Post
              Really? All my systems have a /root folder...


              "Ignore the man behind the curtain"
              Slava Ukraini! 🇺🇦
              Windows no longer obstruct my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Originally posted by jlittle View Post
                To address your question directly cd is not an executable, it's a "built in" command of your shell. sudo only runs executables.
                And I learned a new thing today
                Self-built: Asus PRIME B550M-K/Ryzen 5600GT/32Gb/Intel ARC B580 12Gb/KDE neon
                HP Elitedesk 800 G3 Mini: i5-7500T(35w)/32Gb/Kubuntu LTS
                HP Chromebook 14: i5-1135G7/8Gb/512Gb SSD/KDE Linux

                Comment


                  #9
                  I am just testing my ability to do things by my Kubuntu.
                  Oh, thanks for your help, claydoh and jlittle. It worked out.

                  Comment

                  Users Viewing This Topic

                  Collapse

                  There are 0 users viewing this topic.

                  Working...
                  X