Type Linux Commands In Capital Letters To Run Them As Sudo User

Type Linux Commands In Capital Letters To Run Them As Sudo User

9 Responses

  1. Will says:

    uh. wow. who’d’ve thunk it? Not sure I like it, but it’s creative

  2. Matti says:

    Thanks for the tip!
    I’m just curious how this might be better than running the “sudo su” command to escalate your privileges.

  3. Steve says:

    A common issue for me is typing a full command, then realising i need sudo. If there was a keystroke i could enter to “add sudo” or upcase my line then this would be awesome

  4. Marcos says:

    You might find useful that you can run the command without sudo and after it fails type “`sudo !!“` it’ll run the last command and prepend the sudo.

  5. Jesse McDonald says:

    You can customize input handling in bash by editing ~/.inputrc, including macros like “on Alt-Enter go to the beginning of the line, insert some text, and then run the command”.

  6. Jim says:

    Try: sudo !!
    This will run the last command again

  7. Tony says:

    Steve, I normally press the up arrow, the. Ctrl+A to go to the beginning of the line. Then type sudo and space and press enter. That was the quickest way I found but I see a comment from Marcos that says just type sudo and press enter and it will run the last command with sudo. I’m on vacation now but looking forward to trying that 😊 thanks Marcos

  8. Josh says:

    If you’ve already run the command, then just use “sudo !!” to rerun the last command with sudo in front, otherwise if you haven’t run it yet, try Ctrl+A to get you to the beginning of the line and then you can add sudo yourself

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.