Hi everyone! Hope you're all having a nice life!
Today I'd like to share with you some basics on how to change the login shell and/or terminal prompt. It's a completely and entirely safe procedure which will make no harm to your system, because that's how smart Linux is However, if it makes you feel better/safer, you can make a backup of your .bashrc file located in your home folder but it's really not neccesary. Like I said, Linux's smart enough not to let you screw things up ;D
In order to change your login shell simply type in your terminal:
If the command above doesn't work you may use:
One or the other will list all installed/available shells in your system, to change the current shell for one of those available type:
for example
You'll be asked to type your password, do so then logout/login back, open a terminal and type:
your new shell's name should be displayed. In our example it'd show:
Changing the terminal prompt is quite easy using the command for example, this is how my terminal prompt is configured: where; \e= An ASCII escape character (033), 1;36m\= bold font and cyan color, \t= current time, \u= current logged user, \W= current working directory, \$= current prompt symbol.
resulting in this:
However, this is only temporary and it will be back to defaults in your next login, if you want to make it permanent edit your .bashrc file to make it so:
and add something like this: export PS1='\[\e[1;36m\][\t \u \[\e[0m\]\W \$] '
Well, that's it. This is the basics for changing the login shell and/or terminal prompt. Here's a couple of links to some very instructional sites/articles on these topics
https://bash.cyberciti.biz/guide/Changing_bash_prompt
https://wiki.archlinux.org/index.php/Com...ive_shells
Hope you find this helpful!
Today I'd like to share with you some basics on how to change the login shell and/or terminal prompt. It's a completely and entirely safe procedure which will make no harm to your system, because that's how smart Linux is However, if it makes you feel better/safer, you can make a backup of your .bashrc file located in your home folder
Code:
$ cp ~.bashrc .bashrc.bak
In order to change your login shell simply type in your terminal:
Code:
$ chsh -l
If the command above doesn't work you may use:
Code:
$ cat /etc/shells
One or the other will list all installed/available shells in your system, to change the current shell for one of those available type:
Code:
$ chsh -s desired shell's name
for example
Code:
chsh -s /bin/zsh
You'll be asked to type your password, do so then logout/login back, open a terminal and type:
Code:
echo $SHELL
Code:
$ /bin/zsh
Changing the terminal prompt is quite easy using the command
Code:
$ PS1=ARGS
Code:
$ PS1='\[\e[1;36m\][\t \u \[\e[0m\]\W \$]'
resulting in this:
However, this is only temporary and it will be back to defaults in your next login, if you want to make it permanent edit your .bashrc file to make it so:
Code:
$ nano .bashrc #change nano for your preferred editor, i.e; vi
Well, that's it. This is the basics for changing the login shell and/or terminal prompt. Here's a couple of links to some very instructional sites/articles on these topics
https://bash.cyberciti.biz/guide/Changing_bash_prompt
https://wiki.archlinux.org/index.php/Com...ive_shells
Hope you find this helpful!
Without each others help there ain't no hope for us
Need a translation service? https://www.deepl.com/es/translator
Need a translation service? https://www.deepl.com/es/translator