The images below show that when typing in a command that needs root without sudo and then typing sudo!! to execute the last command with sudo privileges, sudo!! is not inserting a space when trying to execute that command.
I am on kernel 5.2.18-129 and all other software is up to date. Also I am using Gnome shell.


    Answered this earlier:
    https://dev.getsol.us/T8411

    For further clarification seeing the forums will get more of the community to see this post. !! is not part of the sudo command if you type !! on its own it repeats the last command entered into the terminal. !! is part of the shell, an so can be used with any command or on its own.

    It will not put a space there because you didn't tell it to. It is just adding the last line entered into the terminal if you type sudo!! you are appendeding the last entered command to a new string, if you want the space you have to explicitly state it sudo !!

      Yea I see my fault. I have no idea why I did not put the space after it or that I didn't catch it.

      Would it be possible that another distro has this function?

      • sgvd replied to this.

        joshontech
        It would render !! unable to append, so it is not an extra function, you're removing one.

        Ok, I just don't know why I thought that it put a space in automatically. I could have swore that it did that.