Linux “alias” command question [duplicate]












0















This question already has an answer here:




  • How to make an alias permanent?

    3 answers




Where any aliased command is stored? If I am aliasing "ls" as "l" then where will that aliased be stored? Does it affect .bashrc or .cshrc?










share|improve this question















marked as duplicate by Kusalananda bash
Users with the  bash badge can single-handedly close bash 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();
}
);
});
});
Dec 18 at 10:12


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.















  • Related: Where are shell functions stored on Linux?
    – G-Man
    Dec 18 at 4:41
















0















This question already has an answer here:




  • How to make an alias permanent?

    3 answers




Where any aliased command is stored? If I am aliasing "ls" as "l" then where will that aliased be stored? Does it affect .bashrc or .cshrc?










share|improve this question















marked as duplicate by Kusalananda bash
Users with the  bash badge can single-handedly close bash 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();
}
);
});
});
Dec 18 at 10:12


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.















  • Related: Where are shell functions stored on Linux?
    – G-Man
    Dec 18 at 4:41














0












0








0








This question already has an answer here:




  • How to make an alias permanent?

    3 answers




Where any aliased command is stored? If I am aliasing "ls" as "l" then where will that aliased be stored? Does it affect .bashrc or .cshrc?










share|improve this question
















This question already has an answer here:




  • How to make an alias permanent?

    3 answers




Where any aliased command is stored? If I am aliasing "ls" as "l" then where will that aliased be stored? Does it affect .bashrc or .cshrc?





This question already has an answer here:




  • How to make an alias permanent?

    3 answers








bash alias






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 18 at 9:57









Jeff Schaller

38.7k1053125




38.7k1053125










asked Dec 18 at 4:18









Payal

6




6




marked as duplicate by Kusalananda bash
Users with the  bash badge can single-handedly close bash 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();
}
);
});
});
Dec 18 at 10:12


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 Kusalananda bash
Users with the  bash badge can single-handedly close bash 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();
}
);
});
});
Dec 18 at 10:12


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.














  • Related: Where are shell functions stored on Linux?
    – G-Man
    Dec 18 at 4:41


















  • Related: Where are shell functions stored on Linux?
    – G-Man
    Dec 18 at 4:41
















Related: Where are shell functions stored on Linux?
– G-Man
Dec 18 at 4:41




Related: Where are shell functions stored on Linux?
– G-Man
Dec 18 at 4:41










1 Answer
1






active

oldest

votes


















2














There is no persistence for aliased commands - so if you 'alias l ls' and then exit bash, the alias is lost.



If you want them to persist, put them in ~/.bashrc






share|improve this answer





















  • The alias is lost because it’s stored in memory for the shell process. Making them persist, as wef points out, means that a shell process reads a configuration file at startup to store desired configurations in memory.
    – Peschke
    Dec 18 at 6:40


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














There is no persistence for aliased commands - so if you 'alias l ls' and then exit bash, the alias is lost.



If you want them to persist, put them in ~/.bashrc






share|improve this answer





















  • The alias is lost because it’s stored in memory for the shell process. Making them persist, as wef points out, means that a shell process reads a configuration file at startup to store desired configurations in memory.
    – Peschke
    Dec 18 at 6:40
















2














There is no persistence for aliased commands - so if you 'alias l ls' and then exit bash, the alias is lost.



If you want them to persist, put them in ~/.bashrc






share|improve this answer





















  • The alias is lost because it’s stored in memory for the shell process. Making them persist, as wef points out, means that a shell process reads a configuration file at startup to store desired configurations in memory.
    – Peschke
    Dec 18 at 6:40














2












2








2






There is no persistence for aliased commands - so if you 'alias l ls' and then exit bash, the alias is lost.



If you want them to persist, put them in ~/.bashrc






share|improve this answer












There is no persistence for aliased commands - so if you 'alias l ls' and then exit bash, the alias is lost.



If you want them to persist, put them in ~/.bashrc







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 18 at 5:53









wef

913




913












  • The alias is lost because it’s stored in memory for the shell process. Making them persist, as wef points out, means that a shell process reads a configuration file at startup to store desired configurations in memory.
    – Peschke
    Dec 18 at 6:40


















  • The alias is lost because it’s stored in memory for the shell process. Making them persist, as wef points out, means that a shell process reads a configuration file at startup to store desired configurations in memory.
    – Peschke
    Dec 18 at 6:40
















The alias is lost because it’s stored in memory for the shell process. Making them persist, as wef points out, means that a shell process reads a configuration file at startup to store desired configurations in memory.
– Peschke
Dec 18 at 6:40




The alias is lost because it’s stored in memory for the shell process. Making them persist, as wef points out, means that a shell process reads a configuration file at startup to store desired configurations in memory.
– Peschke
Dec 18 at 6:40



Popular posts from this blog

Morgemoulin

Scott Moir

Souastre