I am using bash on Windows and the bash prompt string I see is too big: code2care@LAPTOP-3UHXXRYY:/#, I would rather like it to be a hash (#) or a dollar ($) sigh, let's see how we can change it,
- Open bash,
- Type su root to switch to root account,
- Now type nano ~/.bashrc to open the bashrc file where we will set the PS1 prompt configuration,
- At the end of the file type PS1="\e[0;32m $ \e[0m",
- Press Ctrl + O and Enter, and press Ctrl + O to exit,
- Either close the bash terminal or type source ~/.bashrc to apply changes,
- You prompt now should be in a $ green color.
Change Bash Prompt String
More Posts related to Linux,
- [Fix] Linux - bash: useradd: command not found
- Calculate days between dates using dateutils ddiff command
- pwd Command - Print Working Directory
- Rename a directory using Linux/Unix command
- How to go to the End of File in Nano Editor
- How to tar.gz a directory or folder Command
- How to remove/delete a directory in Linux/macOs
- How to Display content of a file in Terminal Screen?
- ls command sort by file size [Linix/UNIX/macOS/bash]
- How to Copy Entire Directory to another Directory in Linux
- 3 ways to clear screen on Linux Terminal
- Command to check Last Login or Reboot History of Users and TTYs
- How to check uptime of Linux/Unix/macOS system/server using console command?
- How to backup a file in Linux/Unix
- Command to know the installed Debian version?
- Check SSH/OpenSSH version Command
- 3 Commands to stop Nginx Server
- Linux: Create a New User and Password and Login Example
- How to install npm on Ubuntu
- How to List All Users in Linux
- How to Get the List of Shells on Linux
- Fix - ssh-copy-id no identities found error
- Installing and using unzip Command to unzip a zip file using Terminal
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- zsh hello world example
More Posts:
- How to word wrap in HTML - Html
- incorrect line ending: found carriage return (\r) without corresponding newline (\n) - Android
- How to install powershell on macOS - Powershell
- How to check installed Tomcat version - Tomcat
- Failed to install Android.apk on device 'emulator-5554': timeout - Android-Studio
- How to migrate Kaizala to Microsoft Teams - Teams
- Chrome move to next or previous tab using keyboard - Chrome
- [Solution] macOS could not be installed on your computer OSInstall.mpkg appears to be missing or damaged - MacOS