This question already has an answer here:

Currently my command line prompt looks like this nuve@nuve-Inspiron-5547:~$ but I want to change it Azer's Terminal:"Path of current directory". How can I do this? I need exact code line to add to bashrc file.

marked as duplicate by Jacob Vlijm, kos, Eric Carvalho, muru command-line Feb 13 '16 at 23:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • There's an answer to the linked question which shows exactly how to put the current working directory at the end of the prompt. – kos Feb 11 '16 at 12:53

Follow this step ;

  1. Open the terminal
  2. If you don't have a .bashrc file in your $HOME (/home/<username>) , make it with type this command touch $HOME/.bashrc
  3. If you have it, open it with text editor like nano, etc.
  4. add this script in your .bashrc

    PS1='[ \h \W]\$ '
  5. To make your hostname such as you want open file /etc/hostname with sudo

    sudo nano /etc/hostname
  6. Remove previous hostname and add new hostname which you want in this file

    Azer's Terminal
  7. If you have finish , logout or reboot your system to make it affect .

This my .bashrc file enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.