how to change xyz@abc where i need to change xyz when terminal starts [duplicate]
This question already has an answer here:
How can I shorten my command line (bash) prompt?
5 answers
Change the terminal prompt [duplicate]
2 answers
Every time I open my terminal, I see xyz@abc where I type my sudo commands.However, my concern is this xyz and I want to change it to the name of my choice. I am unaware of the technical term for this and also the steps to do this.I am using ubuntu 18.04.
command-line hostname
marked as duplicate by Sergiy Kolodyazhnyy
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 19 at 9:19
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.
add a comment |
This question already has an answer here:
How can I shorten my command line (bash) prompt?
5 answers
Change the terminal prompt [duplicate]
2 answers
Every time I open my terminal, I see xyz@abc where I type my sudo commands.However, my concern is this xyz and I want to change it to the name of my choice. I am unaware of the technical term for this and also the steps to do this.I am using ubuntu 18.04.
command-line hostname
marked as duplicate by Sergiy Kolodyazhnyy
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 19 at 9:19
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.
xyz is your username.
– GabrielaGarcia
Jan 19 at 9:10
add a comment |
This question already has an answer here:
How can I shorten my command line (bash) prompt?
5 answers
Change the terminal prompt [duplicate]
2 answers
Every time I open my terminal, I see xyz@abc where I type my sudo commands.However, my concern is this xyz and I want to change it to the name of my choice. I am unaware of the technical term for this and also the steps to do this.I am using ubuntu 18.04.
command-line hostname
This question already has an answer here:
How can I shorten my command line (bash) prompt?
5 answers
Change the terminal prompt [duplicate]
2 answers
Every time I open my terminal, I see xyz@abc where I type my sudo commands.However, my concern is this xyz and I want to change it to the name of my choice. I am unaware of the technical term for this and also the steps to do this.I am using ubuntu 18.04.
This question already has an answer here:
How can I shorten my command line (bash) prompt?
5 answers
Change the terminal prompt [duplicate]
2 answers
command-line hostname
command-line hostname
asked Jan 19 at 8:24
satyajeet jhasatyajeet jha
1011
1011
marked as duplicate by Sergiy Kolodyazhnyy
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 19 at 9:19
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.
marked as duplicate by Sergiy Kolodyazhnyy
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 19 at 9:19
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.
xyz is your username.
– GabrielaGarcia
Jan 19 at 9:10
add a comment |
xyz is your username.
– GabrielaGarcia
Jan 19 at 9:10
xyz is your username.
– GabrielaGarcia
Jan 19 at 9:10
xyz is your username.
– GabrielaGarcia
Jan 19 at 9:10
add a comment |
1 Answer
1
active
oldest
votes
What you see (xyz@abc
) is the bash prompt:
xyz
is the usernameabc
is the hostname
You can tune it by modifying the variable PS1
in the file ~/.bashrc
. You may see the Ubuntu documentation: Customizing Bash Prompt.
Simply open ~/.bashrc
file in a text editor like nano
, create new line filled with a copy of the PS1 definition. For your need, you will replace the u
username tag by coco
if you want to see coco in place of xyz.
Inside of ~/.bashrc
:
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]coco@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
#PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
PS1='${debian_chroot:+($debian_chroot)}coco@h:w$ '
fi
Some readings:
How to: Change / Setup bash custom prompt (PS1)
.bashrc PS1 generator
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
What you see (xyz@abc
) is the bash prompt:
xyz
is the usernameabc
is the hostname
You can tune it by modifying the variable PS1
in the file ~/.bashrc
. You may see the Ubuntu documentation: Customizing Bash Prompt.
Simply open ~/.bashrc
file in a text editor like nano
, create new line filled with a copy of the PS1 definition. For your need, you will replace the u
username tag by coco
if you want to see coco in place of xyz.
Inside of ~/.bashrc
:
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]coco@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
#PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
PS1='${debian_chroot:+($debian_chroot)}coco@h:w$ '
fi
Some readings:
How to: Change / Setup bash custom prompt (PS1)
.bashrc PS1 generator
add a comment |
What you see (xyz@abc
) is the bash prompt:
xyz
is the usernameabc
is the hostname
You can tune it by modifying the variable PS1
in the file ~/.bashrc
. You may see the Ubuntu documentation: Customizing Bash Prompt.
Simply open ~/.bashrc
file in a text editor like nano
, create new line filled with a copy of the PS1 definition. For your need, you will replace the u
username tag by coco
if you want to see coco in place of xyz.
Inside of ~/.bashrc
:
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]coco@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
#PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
PS1='${debian_chroot:+($debian_chroot)}coco@h:w$ '
fi
Some readings:
How to: Change / Setup bash custom prompt (PS1)
.bashrc PS1 generator
add a comment |
What you see (xyz@abc
) is the bash prompt:
xyz
is the usernameabc
is the hostname
You can tune it by modifying the variable PS1
in the file ~/.bashrc
. You may see the Ubuntu documentation: Customizing Bash Prompt.
Simply open ~/.bashrc
file in a text editor like nano
, create new line filled with a copy of the PS1 definition. For your need, you will replace the u
username tag by coco
if you want to see coco in place of xyz.
Inside of ~/.bashrc
:
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]coco@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
#PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
PS1='${debian_chroot:+($debian_chroot)}coco@h:w$ '
fi
Some readings:
How to: Change / Setup bash custom prompt (PS1)
.bashrc PS1 generator
What you see (xyz@abc
) is the bash prompt:
xyz
is the usernameabc
is the hostname
You can tune it by modifying the variable PS1
in the file ~/.bashrc
. You may see the Ubuntu documentation: Customizing Bash Prompt.
Simply open ~/.bashrc
file in a text editor like nano
, create new line filled with a copy of the PS1 definition. For your need, you will replace the u
username tag by coco
if you want to see coco in place of xyz.
Inside of ~/.bashrc
:
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]coco@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
#PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
PS1='${debian_chroot:+($debian_chroot)}coco@h:w$ '
fi
Some readings:
How to: Change / Setup bash custom prompt (PS1)
.bashrc PS1 generator
edited Jan 19 at 9:23
pa4080
14.1k52665
14.1k52665
answered Jan 19 at 9:14
cmak.frcmak.fr
1,7341019
1,7341019
add a comment |
add a comment |
xyz is your username.
– GabrielaGarcia
Jan 19 at 9:10