How to set shell prompt?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
My shell prompt appears to have changed. I am not sure what I did to cause it.
How it appears now:
bash-4.2$
How I want it to appear:
robinhood@ubuntu$
bash prompt
New contributor
add a comment |Â
up vote
1
down vote
favorite
My shell prompt appears to have changed. I am not sure what I did to cause it.
How it appears now:
bash-4.2$
How I want it to appear:
robinhood@ubuntu$
bash prompt
New contributor
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
My shell prompt appears to have changed. I am not sure what I did to cause it.
How it appears now:
bash-4.2$
How I want it to appear:
robinhood@ubuntu$
bash prompt
New contributor
My shell prompt appears to have changed. I am not sure what I did to cause it.
How it appears now:
bash-4.2$
How I want it to appear:
robinhood@ubuntu$
bash prompt
bash prompt
New contributor
New contributor
edited 13 mins ago
Jeff Schaller
33.8k851113
33.8k851113
New contributor
asked 36 mins ago
robinhoodjr
61
61
New contributor
New contributor
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Prompt is configured by startup files, /etc/profile
or per-user in ~/.profile
or ~/.bashrc
. The documentation explains which files are used depending on how bash is invoked.
Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc
(assuming it got deleted):
if [ "$color_prompt" = yes ]; then
PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
fi
If you do not want current working directory in the prompt, remove w
.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Prompt is configured by startup files, /etc/profile
or per-user in ~/.profile
or ~/.bashrc
. The documentation explains which files are used depending on how bash is invoked.
Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc
(assuming it got deleted):
if [ "$color_prompt" = yes ]; then
PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
fi
If you do not want current working directory in the prompt, remove w
.
add a comment |Â
up vote
0
down vote
Prompt is configured by startup files, /etc/profile
or per-user in ~/.profile
or ~/.bashrc
. The documentation explains which files are used depending on how bash is invoked.
Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc
(assuming it got deleted):
if [ "$color_prompt" = yes ]; then
PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
fi
If you do not want current working directory in the prompt, remove w
.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Prompt is configured by startup files, /etc/profile
or per-user in ~/.profile
or ~/.bashrc
. The documentation explains which files are used depending on how bash is invoked.
Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc
(assuming it got deleted):
if [ "$color_prompt" = yes ]; then
PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
fi
If you do not want current working directory in the prompt, remove w
.
Prompt is configured by startup files, /etc/profile
or per-user in ~/.profile
or ~/.bashrc
. The documentation explains which files are used depending on how bash is invoked.
Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc
(assuming it got deleted):
if [ "$color_prompt" = yes ]; then
PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
fi
If you do not want current working directory in the prompt, remove w
.
edited 17 mins ago
answered 24 mins ago
sebasth
7,44631745
7,44631745
add a comment |Â
add a comment |Â
robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.
robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.
robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.
robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474922%2fhow-to-set-shell-prompt%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password