On Linux, when you type a password for sudo, the terminal typically shows no feedback (not even asterisks) for security reasons. However, if you're using a tool or configuration that shows asterisks (*) and they are replaced with spaces after pressing Enter, this is likely due to the terminal or shell behavior, not sudo itself.
sudo Configurationsudo does not show any feedback for password input. If you see asterisks, it might be due to a custom configuration or wrapper script.sudo -k to reset the timestamp and try again to see if the behavior persists.sudo prompt or a wrapper script (e.g., in your .bashrc or .zshrc), it might be causing this behavior.sudo behavior, such as:
or scripts that usebashalias sudo='sudo '
read -s (silent input) with custom feedback.stty Settingsstty command controls terminal settings. If asterisks are being replaced, it might be due to terminal echo settings.stty -echo before entering the password to disable echoing (though this will hide all feedback, including asterisks).pam Configuration/etc/pam.d/sudo for any custom configurations that might affect password input display.xterm, rxvt, or alacritty) to see if the issue persists. This can help isolate whether the problem is terminal-specific.Open a terminal and run:
bashsudo -k
(This clears the sudo timestamp and forces a password prompt.)
Enter your password and observe if asterisks are replaced with spaces.
If the issue persists, check for custom scripts or terminal settings as described above.
If you provide more details about your terminal emulator, shell, or any custom configurations, I can give more targeted advice! Let me know how it goes.