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,
- Command to know the Available Memory on Linux System
- How to install curl on Alpine Linux
- How to backup a file in Linux/Unix
- Install Java Runtime Environment (Oracle or open JRE) on Ubuntu
- What is the Default Admin user and Password for Jenkins
- How to tar.gz a directory or folder Command
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Fix: bash: ipconfig: command not found on Linux
- Command to check Last Login or Reboot History of Users and TTYs
- Linux: Create a New User and Password and Login Example
- ls command to list only directories
- bash: cls: command not found
- How to exit from nano command
- Installing and using unzip Command to unzip a zip file using Terminal
- What does apt-get update command does?
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- How to remove or uninstall Java from Ubuntu using apt-get
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- Sort ls command by last modified date and time
- Create Nested Directories using mkdir Command
- How to Exit a File in Terminal (Bash/Zsh)
- Command to know the installed Debian version?
- How to connect to SSH port other than default 22
- How to save a file in Nano Editor and Exit
- Install OpenSSL on Linux/Ubuntu
More Posts:
- Install Docker on Mac using brew cask - Docker
- Know the Current Project/Module Classpath using Java Code - Java
- Unsupported major.minor version 52.0 in java - Java
- [fix] Editor could not be opened unexpected error: File is a directory (VS Code) - HowTos
- What is exit(0), exit(1) ... exit(8) codes in Python Programming - Python
- say command macOS terminal examples - MacOS
- Display Safari URL address link on hover - MacOS
- Android Studio SDK Build-tools 23 rc2 not getting installed - Android-Studio