Games

How to display Asterisks in your terminal when typing your password in Ubuntu 18.04

Understanding Password Input in Ubuntu 18.04

When it comes to security, passwords play a vital role in protecting our data and access to systems. By default, many command-line interfaces, including the terminal in Ubuntu 18.04, do not display any asterisks or placeholders while you type your password. Instead, the cursor remains static, creating the illusion that no input is being registered. While this behavior is intended to enhance security by not revealing the length or content of the password, it can often lead to confusion among users. This guide will walk you through the process of changing this setting to display asterisks as you type your password in the terminal.

Why Password Input is Hidden

The Security Aspect

The decision to keep password inputs hidden dates back to fundamental principles of security. When passwords are typed into a terminal without being displayed, it helps prevent shoulder surfing—where someone might be able to glance over your shoulder and capture your password as you type. It also reduces the chances of someone guessing your password based on its length. By not displaying any characters, users can ensure that their secrets remain confidential, even in public spaces.

See also  How to install Microsoft Core Fonts on a Chromebook for Linux Applications

user experience Trade-offs

However, this design choice can sometimes create challenges for users. Many people are accustomed to seeing a visual representation of their input, such as asterisks or dots. The absence of such feedback can lead to stress and uncertainty, especially for those who might be concerned about typing errors. Consequently, a growing number of users prefer to have some form of visual confirmation while entering their passwords.

How to Enable Asterisk Display for Passwords in the Terminal

While the default behavior of Ubuntu’s terminal is to conceal password characters, you can modify this through a simple process. Below, you will find detailed steps that enable the display of asterisks as you type.

Step 1: Open the Terminal

To start, you’ll need to access your terminal. You can do this by pressing Ctrl + Alt + T on your keyboard. You may also search for “Terminal” in the application menu.

Step 2: Modify the sudo Command Behavior

The feature to show asterisks can be toggled by adjusting the configuration of the sudo command, which is commonly used to execute commands with superuser privileges. To do this safely, you’ll need to edit the sudo configuration file:

  1. Open the sudo Configuration File:
    Run the following command:
    bash
    sudo visudo

    This will open the /etc/sudoers file in a terminal-based text editor. Using visudo is essential because it checks for syntax errors before saving changes, thus preventing potential issues that might lock you out of administrative commands.

  2. Locate the Defaults Section:
    Within this file, scroll down to find a section labeled Defaults. Here, you’ll notice various parameters that govern the behavior of sudo.

  3. Add Asterisk Display:
    To enable the display of asterisks when entering your password, add this line under the Defaults section:
    bash
    Defaults pwfeedback

    This setting allows for visual feedback when entering your password, translating your inputs into asterisks displayed in the terminal.

  4. Save and Exit:
    After making the necessary changes, save the file and close the editor. In visudo, this is typically done by pressing CTRL + X, followed by Y to confirm the changes and then Enter.

Step 3: Testing Your Changes

To ensure that your newly configured settings are effective, you can now test the sudo command. Run any command that requires superuser privileges. For example:
bash
sudo echo “Testing”

See also  How to install Google Chrome on Linux Mint 20.1

When prompted for your password, you should now see asterisks appearing on the screen as you type. This change enhances user experience by providing visual feedback, ultimately increasing confidence in the input process.

Additional Tips for Managing Password Security

While having asterisk feedback can be beneficial, it’s essential to keep up with other security practices to safeguard your credentials. Below are some best practices to consider:

Use Strong Passwords

Develop strong passwords that are difficult to guess. A combination of upper and lower case letters, numbers, and special characters can significantly improve your password’s strength.

Consider Using a Password Manager

Password managers can help you create, retrieve, and store complex passwords securely. Utilizing a password manager can reduce the need to remember various passwords, while still adhering to best practices for security.

Enable Two-Factor Authentication

Whenever possible, enable two-factor authentication (2FA) on your accounts. 2FA adds an additional layer of security by requiring a second form of identification—such as a text message or an authentication app—beyond just your password.

Conclusion

While Ubuntu 18.04, by default, keeps password entries hidden in the terminal, enabling the display of asterisks can significantly enhance user confidence and experience. It is a straightforward process, and the benefits can be substantial across both security and usability domains. Remember that security measures are cumulative; combining a visual input method with strong password practices will give you the best safeguards against unauthorized access.

FAQ

1. Is it safe to display asterisks when typing a password?

Yes, displaying asterisks when entering your password provides visual feedback without exposing the actual characters. This is generally considered safe as long as you are aware of your surroundings to prevent shoulder surfing.

See also  All Chromebooks available in 2025 with Backlit Keyboards

2. Will enabling asterisk feedback make my system less secure?

No, it will not compromise your system’s security. The purpose of the asterisks is to provide feedback while still keeping your password hidden from those who might be watching.

3. Can I revert back to the original behavior if I change my mind?

Absolutely! You can easily reverse the changes by removing the line you added to the sudoers file and saving it again.

4. What are some other ways to secure my Ubuntu system?

In addition to using strong passwords and enabling visual feedback for your password, consider keeping your system updated, using firewall protection, and regularly auditing your installed software.

5. Are there other Linux distributions that behave similarly?

Yes, many Linux distributions also follow similar conventions regarding password input in terminals. However, they may have different methods for enabling visual feedback; check the documentation relevant to your specific distribution.

About the author

Jeffrey Collins

Jeffrey Collins

Jeffery Collins is a Microsoft Office specialist with over 15 years of experience in teaching, training, and business consulting. He has guided thousands of students and professionals in mastering Office applications such as Excel, Word, PowerPoint, and Outlook. From advanced Excel functions and VBA automation to professional Word formatting, data-driven PowerPoint presentations, and efficient email management in Outlook, Jeffery is passionate about making Office tools practical and accessible. On Softwers, he shares step-by-step guides, troubleshooting tips, and expert insights to help users unlock the full potential of Microsoft Office.