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?










share|improve this question









New contributor




Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by muru, Ravexina command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

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, 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















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?










share|improve this question









New contributor




Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by muru, Ravexina command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

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, 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













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?










share|improve this question









New contributor




Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












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






share|improve this question









New contributor




Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 17 at 14:11





















New contributor




Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 17 at 13:58









Njoi

11




11




New contributor




Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Njoi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




marked as duplicate by muru, Ravexina command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

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 command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

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, 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














  • 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










  • 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















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei