Announcement

Collapse
No announcement yet.

sudo prompt

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

    [Post-Install] sudo prompt

    Can you explain to me what i did wrong. I type:

    sudo -p welcome

    but bash output:

    expected one of these actions: --help, --version, --remove-timestamp, --validate, --list, --edit, --
    login, --shell, a command as a positional argument, --reset-timestamp
    usage: sudo -h | -K | -k | -V
    usage: sudo [-ABbknS] [-p prompt] [-D directory] [-g group] [-u user] [-i | -s] [command [arg ...]]
    usage: sudo -v [-ABknS] [-p prompt] [-g group] [-u user]
    usage: sudo -l [-ABknS] [-p prompt] [-U user] [-g group] [-u user] [command [arg ...]]
    usage: sudo -e [-ABknS] [-p prompt] [-D directory] [-g group] [-u user] file ...


    How can I see my prompt?
    ​

    #2
    AI generated answer.


    You did not actually do anything wrong with the -p welcome part of your command, but sudo requires you to give it a command to run (or a specific action flag) whenever you use it.

    Because you only typed sudo -p welcome, sudo did not know what program you wanted it to execute with administrative privileges, so it printed the usage help message instead.

    To see your custom prompt in action, you need to append a command to the end of your line, or use the validate flag (-v) to just refresh your credentials.


    How to See Your Prompt

    Here are two quick ways to test it:
    • Run a simple command: Append a basic command like ls to the end.

      sudo -p "welcome: " ls
    • Validate credentials only: Use the -v flag if you want to test the prompt without running a specific command.

      sudo -p "welcome: " -v
    ​
    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


      #3
      Thanks for your help, Snowhog.

      Comment

      Users Viewing This Topic

      Collapse

      There is 1 user viewing this topic.

      Working...
      X