where are commands actually stored in linux? [duplicate]
up vote
0
down vote
favorite
This question already has an answer here:
Shell command for outputting absolute path of binary
4 answers
What is the difference between locate/whereis/which
2 answers
when i hit where is ls i find that ls is stored at multiple location on my linux machine. Output of the command is listed below
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz
I can also find ls command in /bin folder
I wanted to know which is the original location from where if i delete it, it will not work on my machine?
Also why is the same command placed at multiple locations?
command-line
New contributor
marked as duplicate by muru, Ravexina
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();
}
);
});
});
Nov 17 at 14: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:
Shell command for outputting absolute path of binary
4 answers
What is the difference between locate/whereis/which
2 answers
when i hit where is ls i find that ls is stored at multiple location on my linux machine. Output of the command is listed below
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz
I can also find ls command in /bin folder
I wanted to know which is the original location from where if i delete it, it will not work on my machine?
Also why is the same command placed at multiple locations?
command-line
New contributor
marked as duplicate by muru, Ravexina
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();
}
);
});
});
Nov 17 at 14: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
whereis
doesn't only show the executables that correspond to a command, but also source code files and manual pages (if available). To just find out what executable would be called when you type a specific command, trytype YOUR_COMMAND
. This will also recognize shell keywords and built-ins which don't have a separate executable.
– Byte Commander
Nov 17 at 14:14
See askubuntu.com/a/799777/158442
– muru
Nov 17 at 14:16
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Shell command for outputting absolute path of binary
4 answers
What is the difference between locate/whereis/which
2 answers
when i hit where is ls i find that ls is stored at multiple location on my linux machine. Output of the command is listed below
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz
I can also find ls command in /bin folder
I wanted to know which is the original location from where if i delete it, it will not work on my machine?
Also why is the same command placed at multiple locations?
command-line
New contributor
This question already has an answer here:
Shell command for outputting absolute path of binary
4 answers
What is the difference between locate/whereis/which
2 answers
when i hit where is ls i find that ls is stored at multiple location on my linux machine. Output of the command is listed below
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz
I can also find ls command in /bin folder
I wanted to know which is the original location from where if i delete it, it will not work on my machine?
Also why is the same command placed at multiple locations?
This question already has an answer here:
Shell command for outputting absolute path of binary
4 answers
What is the difference between locate/whereis/which
2 answers
command-line
command-line
New contributor
New contributor
edited Nov 17 at 14:11
New contributor
asked Nov 17 at 13:58
Njoi
11
11
New contributor
New contributor
marked as duplicate by muru, Ravexina
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();
}
);
});
});
Nov 17 at 14: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 muru, Ravexina
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();
}
);
});
});
Nov 17 at 14: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
whereis
doesn't only show the executables that correspond to a command, but also source code files and manual pages (if available). To just find out what executable would be called when you type a specific command, trytype YOUR_COMMAND
. This will also recognize shell keywords and built-ins which don't have a separate executable.
– Byte Commander
Nov 17 at 14:14
See askubuntu.com/a/799777/158442
– muru
Nov 17 at 14:16
add a comment |
1
whereis
doesn't only show the executables that correspond to a command, but also source code files and manual pages (if available). To just find out what executable would be called when you type a specific command, trytype YOUR_COMMAND
. This will also recognize shell keywords and built-ins which don't have a separate executable.
– Byte Commander
Nov 17 at 14:14
See askubuntu.com/a/799777/158442
– muru
Nov 17 at 14:16
1
1
whereis
doesn't only show the executables that correspond to a command, but also source code files and manual pages (if available). To just find out what executable would be called when you type a specific command, try type YOUR_COMMAND
. This will also recognize shell keywords and built-ins which don't have a separate executable.– Byte Commander
Nov 17 at 14:14
whereis
doesn't only show the executables that correspond to a command, but also source code files and manual pages (if available). To just find out what executable would be called when you type a specific command, try type YOUR_COMMAND
. This will also recognize shell keywords and built-ins which don't have a separate executable.– Byte Commander
Nov 17 at 14:14
See askubuntu.com/a/799777/158442
– muru
Nov 17 at 14:16
See askubuntu.com/a/799777/158442
– muru
Nov 17 at 14:16
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
1
whereis
doesn't only show the executables that correspond to a command, but also source code files and manual pages (if available). To just find out what executable would be called when you type a specific command, trytype YOUR_COMMAND
. This will also recognize shell keywords and built-ins which don't have a separate executable.– Byte Commander
Nov 17 at 14:14
See askubuntu.com/a/799777/158442
– muru
Nov 17 at 14:16