Why script name ($0) is different when logged in over ssh? [duplicate]

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This question already has an answer here:
Difference between Login Shell and Non-Login Shell?
4 answers
Why we can not see a single hyphen from $0 on a login shell invoked with `--login` option?
2 answers
When I open a terminal on my own computer and run echo $0, I get /bin/bash - which is the name of the executable being run.
However, when I run echo $0 in an ssh session, I get -bash. Why? What does the dash mean? It's not like there is a command named -bash.
bash shell ssh
marked as duplicate by Jeff Schaller, Tim Kennedy, Thomas, Stephen Kitt
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();
);
);
);
Oct 3 at 19:03
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 |Â
up vote
0
down vote
favorite
This question already has an answer here:
Difference between Login Shell and Non-Login Shell?
4 answers
Why we can not see a single hyphen from $0 on a login shell invoked with `--login` option?
2 answers
When I open a terminal on my own computer and run echo $0, I get /bin/bash - which is the name of the executable being run.
However, when I run echo $0 in an ssh session, I get -bash. Why? What does the dash mean? It's not like there is a command named -bash.
bash shell ssh
marked as duplicate by Jeff Schaller, Tim Kennedy, Thomas, Stephen Kitt
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();
);
);
);
Oct 3 at 19:03
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.
1
Or better: unix.stackexchange.com/q/38175/117549
â Jeff Schaller
Oct 3 at 18:53
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Difference between Login Shell and Non-Login Shell?
4 answers
Why we can not see a single hyphen from $0 on a login shell invoked with `--login` option?
2 answers
When I open a terminal on my own computer and run echo $0, I get /bin/bash - which is the name of the executable being run.
However, when I run echo $0 in an ssh session, I get -bash. Why? What does the dash mean? It's not like there is a command named -bash.
bash shell ssh
This question already has an answer here:
Difference between Login Shell and Non-Login Shell?
4 answers
Why we can not see a single hyphen from $0 on a login shell invoked with `--login` option?
2 answers
When I open a terminal on my own computer and run echo $0, I get /bin/bash - which is the name of the executable being run.
However, when I run echo $0 in an ssh session, I get -bash. Why? What does the dash mean? It's not like there is a command named -bash.
This question already has an answer here:
Difference between Login Shell and Non-Login Shell?
4 answers
Why we can not see a single hyphen from $0 on a login shell invoked with `--login` option?
2 answers
bash shell ssh
bash shell ssh
asked Oct 3 at 18:46
Jan Warchoà Â
353317
353317
marked as duplicate by Jeff Schaller, Tim Kennedy, Thomas, Stephen Kitt
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();
);
);
);
Oct 3 at 19:03
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 Jeff Schaller, Tim Kennedy, Thomas, Stephen Kitt
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();
);
);
);
Oct 3 at 19:03
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.
1
Or better: unix.stackexchange.com/q/38175/117549
â Jeff Schaller
Oct 3 at 18:53
add a comment |Â
1
Or better: unix.stackexchange.com/q/38175/117549
â Jeff Schaller
Oct 3 at 18:53
1
1
Or better: unix.stackexchange.com/q/38175/117549
â Jeff Schaller
Oct 3 at 18:53
Or better: unix.stackexchange.com/q/38175/117549
â Jeff Schaller
Oct 3 at 18:53
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
1
Or better: unix.stackexchange.com/q/38175/117549
â Jeff Schaller
Oct 3 at 18:53