Hide hostname and username in Terminal [UBUNTU 22]

Поделиться
HTML-код
  • Опубликовано: 24 авг 2023
  • This video provides a step-by-step guide on how to remove the username and computer name from the Terminal screen on Linux. While the tutorial is based on Ubuntu, the same steps can be applied to other Linux distributions as well.
    By default, when you open the Terminal on Linux, your username and computer name are displayed on the screen. While this is useful for ensuring that you are logged into the correct computer using the correct user ID, it may not be ideal for sharing your Terminal screen with others, such as in a tutorial. Fortunately, it is easy to remove the username and computer name from the Terminal screen.
    To begin, open the `.bashrc` file by typing the command `nano ~/.bashrc` and pressing **Enter**. This will open the file in edit mode.
    Scroll to the bottom of the `.bashrc` file. At the very bottom, press *Enter* to create a new line, and then add the line:
    export PS1=”\\W \\$”`
    Next, save the `.bashrc` file. To save the file using the nano editor, press *Ctrl+X* and then press "Y". When prompted to confirm the filename to save, press *Enter* to save to the same `.bashrc` file.
    Finally, close the current Terminal window and open a new one. You should now see that the Terminal screen no longer displays your username and computer name.
    In summary, the steps to remove the username and computer name from the Terminal screen on Linux are:
    1. Open the `.bashrc` file by typing the command `nano ~/.bashrc` and pressing **Enter**.
    2. Scroll to the bottom of the `.bashrc` file.
    3. Press *Enter* to create a new line, and then add the line `export PS1=”\\W \\$”`.
    4. Save the `.bashrc` file by pressing *Ctrl+X* and then pressing "Y".
    5. Close the current Terminal window and open a new one.
  • НаукаНаука

Комментарии • 6

  • @UtopiaImagination
    @UtopiaImagination 2 месяца назад +2

    Bro you safed my life I had an inappropriate name

  • @kevinwauman7382
    @kevinwauman7382 4 месяца назад

    Very helpful, thank you :)

  • @thecyberfranko.
    @thecyberfranko. Месяц назад

    If I wanted to find documentation about how to customize this without reading two bibles, where would you advise to look?

  • @manthansharma6769
    @manthansharma6769 8 месяцев назад

    Thank you

  • @thaidoan868
    @thaidoan868 2 месяца назад

    thanks a lot

  • @user-my5dg9wl9l
    @user-my5dg9wl9l 3 месяца назад

    Nice video, thank you!!