Linux “alias” command question [duplicate]
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?
bash alias
                    marked as duplicate by Kusalananda
    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.
add a comment |
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?
bash alias
                    marked as duplicate by Kusalananda
    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
add a comment |
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?
bash alias
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
bash alias
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
    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
    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
add a comment |
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
add a comment |
                                1 Answer
                                1
                        
active
oldest
votes
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
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
add a comment |
                                1 Answer
                                1
                        
active
oldest
votes
                                1 Answer
                                1
                        
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
Related: Where are shell functions stored on Linux?
– G-Man
Dec 18 at 4:41