Overriding a distro-dependent Bash alias to act a bit different

Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
In Ubuntu 16.04 I've added the following code to /etc/bash.bashrc:
alias ll="ls -la --group-directories-first"
I then rebooted.
Note: I used /etc/bash.bashrc because I needed all aliases whatsoever in the one file and available for all users.
My intention was to rewrite the "native" ll alias. Yet it wasn't changed; if I go to any dir that includes dirs and files, and I execute ll, I get a list without dirs being sorted above files. In other words.
What did I do wrong?
alias bashrc
add a comment |Â
up vote
2
down vote
favorite
In Ubuntu 16.04 I've added the following code to /etc/bash.bashrc:
alias ll="ls -la --group-directories-first"
I then rebooted.
Note: I used /etc/bash.bashrc because I needed all aliases whatsoever in the one file and available for all users.
My intention was to rewrite the "native" ll alias. Yet it wasn't changed; if I go to any dir that includes dirs and files, and I execute ll, I get a list without dirs being sorted above files. In other words.
What did I do wrong?
alias bashrc
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
In Ubuntu 16.04 I've added the following code to /etc/bash.bashrc:
alias ll="ls -la --group-directories-first"
I then rebooted.
Note: I used /etc/bash.bashrc because I needed all aliases whatsoever in the one file and available for all users.
My intention was to rewrite the "native" ll alias. Yet it wasn't changed; if I go to any dir that includes dirs and files, and I execute ll, I get a list without dirs being sorted above files. In other words.
What did I do wrong?
alias bashrc
In Ubuntu 16.04 I've added the following code to /etc/bash.bashrc:
alias ll="ls -la --group-directories-first"
I then rebooted.
Note: I used /etc/bash.bashrc because I needed all aliases whatsoever in the one file and available for all users.
My intention was to rewrite the "native" ll alias. Yet it wasn't changed; if I go to any dir that includes dirs and files, and I execute ll, I get a list without dirs being sorted above files. In other words.
What did I do wrong?
alias bashrc
alias bashrc
edited Sep 22 at 8:30
asked Aug 9 '17 at 16:27
JohnDoea
82726
82726
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
3
down vote
accepted
The ll alias is defined in the default .bashrc.
An alias definition is a command. Bash is an imperative language, it executes commands one after the other. If there are multiple definitions for the same alias, the alias is redefined each time the shell executes one of the definitions. Thus the last definition wins.
When bash starts, it reads the system file /etc/bash.bashrc before the user file ~/.bashrc. Thus a definition in ~/.bashrc overrides any definition of the same alias in /etc/bash.bashrc. You can't (sanely) do anything in /etc/bash.bashrc to prevent a redefinition in ~/.bashrc.
It doesn't make sense to impose convenience aliases on users. That's why ll is defined in ~/.bashrc and not in /etc/bash.bashrc. So instead of putting your preferred definition in the system file, put it in your user file.
You could change the default .bashrc â that's /etc/skel/.bashrc. This file is copied to a user's home directory when the user's account is created. Changing a file in /etc/skel has no impact on already-existing accounts. But even that is not a good idea since what you're defining is a personal preference.
add a comment |Â
up vote
2
down vote
/etc/bash.bashrc applies to all users
~/.bashrc only applies to the user in which home folder it is.
So, if you change the alias ll in /etc/bash.bashrc and run ll, you will get the output of the alias defined in ~/.bashrc, that is because ~/.bashrc has precedence over the definition in /etc/bash.bashrc.
To put it simply; Add new aliases in /etc/bash.bashrc, but for rewrites, change ~/.bashrc.
Edit:
If you really want to have it all in one file, remove all aliases from all ~/.bashrc ~/.bash_profile and/or ~/.profile files of all users, then add all the aliases to /etc/bash.bashrc this will create a global alias configuration without any issues.
Edit 2:
Create or edit /etc/skel/.bashrc and copy your default .bashrc config, so that when you create a new user, there are no default aliases set.
Thank you @user4556274 for the edit suggestion.
2
@Benia, if you are the only user on your system, put all changes in~/.bashrc./etc/bash.bashrcis for settings that are to be shared among all users; then individual users may add additional (or override) settings in their personal~/.bashrc.
â user4556274
Aug 9 '17 at 16:49
2
Definitely DO NOT source.profilefrom/etc/bash.bashrcor any file withrcin the name.
â Jesse_b
Aug 9 '17 at 16:52
Remove anyllaliases from~/.bashrc~/.bash_profileand/or~/.profilefor all users on the machine.
â Jesse_b
Aug 9 '17 at 16:55
I edited the answer, hopefully this will solve your question.
â Hunter.S.Thompson
Aug 9 '17 at 16:57
1
@Hunter.S.Thompson, note the OP should also modify/etc/skel/.bashrc(or the equivalent) to remove any aliases which should not be added to a new user's.bashrcwhen a new user is added to the system.
â user4556274
Aug 9 '17 at 16:59
 |Â
show 3 more comments
up vote
1
down vote
I'm fairly certain /etc/bash.bashrc isn't a thing. The file you are looking for is $HOME/.bash_profile OR $HOME/.profile Alternatively you could use $HOME/.bashrc but I think profile is the correct file for what you are trying to accomplish.
For an explanation of the difference between .bash_profile and .bashrc please see: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
To source .profile from .bash_profile add the following to your .bash_profile:
if [ -f ~/.profile ]; then
. ~/.profile
fi
Another potential option would be to make ll into a function inside /etc/bash.bashrc instead of an alias which I believe the function will take precedence over any aliases set with the same name.
ll ()
ls -la --group-directories-first
Yea append that to the end of the file.
â Hunter.S.Thompson
Aug 9 '17 at 16:32
1
/etc/bash.bashrcis a thing for global settings. However, ifllis redefined in the user's.bashrc, that will take precedence over the definition in/etc/bash.bashrc
â user4556274
Aug 9 '17 at 16:34
@user4556274 On Mac and CentOS it's just/etc/bashrc
â Jesse_b
Aug 9 '17 at 16:36
1
@Jesse_b, yes, but the OP identified the system as Ubuntu 16.04
â user4556274
Aug 9 '17 at 16:38
1
. ~/.profileis the same assource ~/.profileWhich essentially just executes all commands within that file in the current shell vs executing a script which runs all the commands in a new shell.
â Jesse_b
Aug 9 '17 at 16:54
 |Â
show 5 more comments
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
The ll alias is defined in the default .bashrc.
An alias definition is a command. Bash is an imperative language, it executes commands one after the other. If there are multiple definitions for the same alias, the alias is redefined each time the shell executes one of the definitions. Thus the last definition wins.
When bash starts, it reads the system file /etc/bash.bashrc before the user file ~/.bashrc. Thus a definition in ~/.bashrc overrides any definition of the same alias in /etc/bash.bashrc. You can't (sanely) do anything in /etc/bash.bashrc to prevent a redefinition in ~/.bashrc.
It doesn't make sense to impose convenience aliases on users. That's why ll is defined in ~/.bashrc and not in /etc/bash.bashrc. So instead of putting your preferred definition in the system file, put it in your user file.
You could change the default .bashrc â that's /etc/skel/.bashrc. This file is copied to a user's home directory when the user's account is created. Changing a file in /etc/skel has no impact on already-existing accounts. But even that is not a good idea since what you're defining is a personal preference.
add a comment |Â
up vote
3
down vote
accepted
The ll alias is defined in the default .bashrc.
An alias definition is a command. Bash is an imperative language, it executes commands one after the other. If there are multiple definitions for the same alias, the alias is redefined each time the shell executes one of the definitions. Thus the last definition wins.
When bash starts, it reads the system file /etc/bash.bashrc before the user file ~/.bashrc. Thus a definition in ~/.bashrc overrides any definition of the same alias in /etc/bash.bashrc. You can't (sanely) do anything in /etc/bash.bashrc to prevent a redefinition in ~/.bashrc.
It doesn't make sense to impose convenience aliases on users. That's why ll is defined in ~/.bashrc and not in /etc/bash.bashrc. So instead of putting your preferred definition in the system file, put it in your user file.
You could change the default .bashrc â that's /etc/skel/.bashrc. This file is copied to a user's home directory when the user's account is created. Changing a file in /etc/skel has no impact on already-existing accounts. But even that is not a good idea since what you're defining is a personal preference.
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
The ll alias is defined in the default .bashrc.
An alias definition is a command. Bash is an imperative language, it executes commands one after the other. If there are multiple definitions for the same alias, the alias is redefined each time the shell executes one of the definitions. Thus the last definition wins.
When bash starts, it reads the system file /etc/bash.bashrc before the user file ~/.bashrc. Thus a definition in ~/.bashrc overrides any definition of the same alias in /etc/bash.bashrc. You can't (sanely) do anything in /etc/bash.bashrc to prevent a redefinition in ~/.bashrc.
It doesn't make sense to impose convenience aliases on users. That's why ll is defined in ~/.bashrc and not in /etc/bash.bashrc. So instead of putting your preferred definition in the system file, put it in your user file.
You could change the default .bashrc â that's /etc/skel/.bashrc. This file is copied to a user's home directory when the user's account is created. Changing a file in /etc/skel has no impact on already-existing accounts. But even that is not a good idea since what you're defining is a personal preference.
The ll alias is defined in the default .bashrc.
An alias definition is a command. Bash is an imperative language, it executes commands one after the other. If there are multiple definitions for the same alias, the alias is redefined each time the shell executes one of the definitions. Thus the last definition wins.
When bash starts, it reads the system file /etc/bash.bashrc before the user file ~/.bashrc. Thus a definition in ~/.bashrc overrides any definition of the same alias in /etc/bash.bashrc. You can't (sanely) do anything in /etc/bash.bashrc to prevent a redefinition in ~/.bashrc.
It doesn't make sense to impose convenience aliases on users. That's why ll is defined in ~/.bashrc and not in /etc/bash.bashrc. So instead of putting your preferred definition in the system file, put it in your user file.
You could change the default .bashrc â that's /etc/skel/.bashrc. This file is copied to a user's home directory when the user's account is created. Changing a file in /etc/skel has no impact on already-existing accounts. But even that is not a good idea since what you're defining is a personal preference.
answered Aug 9 '17 at 23:38
Gilles
512k12010151547
512k12010151547
add a comment |Â
add a comment |Â
up vote
2
down vote
/etc/bash.bashrc applies to all users
~/.bashrc only applies to the user in which home folder it is.
So, if you change the alias ll in /etc/bash.bashrc and run ll, you will get the output of the alias defined in ~/.bashrc, that is because ~/.bashrc has precedence over the definition in /etc/bash.bashrc.
To put it simply; Add new aliases in /etc/bash.bashrc, but for rewrites, change ~/.bashrc.
Edit:
If you really want to have it all in one file, remove all aliases from all ~/.bashrc ~/.bash_profile and/or ~/.profile files of all users, then add all the aliases to /etc/bash.bashrc this will create a global alias configuration without any issues.
Edit 2:
Create or edit /etc/skel/.bashrc and copy your default .bashrc config, so that when you create a new user, there are no default aliases set.
Thank you @user4556274 for the edit suggestion.
2
@Benia, if you are the only user on your system, put all changes in~/.bashrc./etc/bash.bashrcis for settings that are to be shared among all users; then individual users may add additional (or override) settings in their personal~/.bashrc.
â user4556274
Aug 9 '17 at 16:49
2
Definitely DO NOT source.profilefrom/etc/bash.bashrcor any file withrcin the name.
â Jesse_b
Aug 9 '17 at 16:52
Remove anyllaliases from~/.bashrc~/.bash_profileand/or~/.profilefor all users on the machine.
â Jesse_b
Aug 9 '17 at 16:55
I edited the answer, hopefully this will solve your question.
â Hunter.S.Thompson
Aug 9 '17 at 16:57
1
@Hunter.S.Thompson, note the OP should also modify/etc/skel/.bashrc(or the equivalent) to remove any aliases which should not be added to a new user's.bashrcwhen a new user is added to the system.
â user4556274
Aug 9 '17 at 16:59
 |Â
show 3 more comments
up vote
2
down vote
/etc/bash.bashrc applies to all users
~/.bashrc only applies to the user in which home folder it is.
So, if you change the alias ll in /etc/bash.bashrc and run ll, you will get the output of the alias defined in ~/.bashrc, that is because ~/.bashrc has precedence over the definition in /etc/bash.bashrc.
To put it simply; Add new aliases in /etc/bash.bashrc, but for rewrites, change ~/.bashrc.
Edit:
If you really want to have it all in one file, remove all aliases from all ~/.bashrc ~/.bash_profile and/or ~/.profile files of all users, then add all the aliases to /etc/bash.bashrc this will create a global alias configuration without any issues.
Edit 2:
Create or edit /etc/skel/.bashrc and copy your default .bashrc config, so that when you create a new user, there are no default aliases set.
Thank you @user4556274 for the edit suggestion.
2
@Benia, if you are the only user on your system, put all changes in~/.bashrc./etc/bash.bashrcis for settings that are to be shared among all users; then individual users may add additional (or override) settings in their personal~/.bashrc.
â user4556274
Aug 9 '17 at 16:49
2
Definitely DO NOT source.profilefrom/etc/bash.bashrcor any file withrcin the name.
â Jesse_b
Aug 9 '17 at 16:52
Remove anyllaliases from~/.bashrc~/.bash_profileand/or~/.profilefor all users on the machine.
â Jesse_b
Aug 9 '17 at 16:55
I edited the answer, hopefully this will solve your question.
â Hunter.S.Thompson
Aug 9 '17 at 16:57
1
@Hunter.S.Thompson, note the OP should also modify/etc/skel/.bashrc(or the equivalent) to remove any aliases which should not be added to a new user's.bashrcwhen a new user is added to the system.
â user4556274
Aug 9 '17 at 16:59
 |Â
show 3 more comments
up vote
2
down vote
up vote
2
down vote
/etc/bash.bashrc applies to all users
~/.bashrc only applies to the user in which home folder it is.
So, if you change the alias ll in /etc/bash.bashrc and run ll, you will get the output of the alias defined in ~/.bashrc, that is because ~/.bashrc has precedence over the definition in /etc/bash.bashrc.
To put it simply; Add new aliases in /etc/bash.bashrc, but for rewrites, change ~/.bashrc.
Edit:
If you really want to have it all in one file, remove all aliases from all ~/.bashrc ~/.bash_profile and/or ~/.profile files of all users, then add all the aliases to /etc/bash.bashrc this will create a global alias configuration without any issues.
Edit 2:
Create or edit /etc/skel/.bashrc and copy your default .bashrc config, so that when you create a new user, there are no default aliases set.
Thank you @user4556274 for the edit suggestion.
/etc/bash.bashrc applies to all users
~/.bashrc only applies to the user in which home folder it is.
So, if you change the alias ll in /etc/bash.bashrc and run ll, you will get the output of the alias defined in ~/.bashrc, that is because ~/.bashrc has precedence over the definition in /etc/bash.bashrc.
To put it simply; Add new aliases in /etc/bash.bashrc, but for rewrites, change ~/.bashrc.
Edit:
If you really want to have it all in one file, remove all aliases from all ~/.bashrc ~/.bash_profile and/or ~/.profile files of all users, then add all the aliases to /etc/bash.bashrc this will create a global alias configuration without any issues.
Edit 2:
Create or edit /etc/skel/.bashrc and copy your default .bashrc config, so that when you create a new user, there are no default aliases set.
Thank you @user4556274 for the edit suggestion.
edited Aug 9 '17 at 17:04
answered Aug 9 '17 at 16:42
Hunter.S.Thompson
4,66931334
4,66931334
2
@Benia, if you are the only user on your system, put all changes in~/.bashrc./etc/bash.bashrcis for settings that are to be shared among all users; then individual users may add additional (or override) settings in their personal~/.bashrc.
â user4556274
Aug 9 '17 at 16:49
2
Definitely DO NOT source.profilefrom/etc/bash.bashrcor any file withrcin the name.
â Jesse_b
Aug 9 '17 at 16:52
Remove anyllaliases from~/.bashrc~/.bash_profileand/or~/.profilefor all users on the machine.
â Jesse_b
Aug 9 '17 at 16:55
I edited the answer, hopefully this will solve your question.
â Hunter.S.Thompson
Aug 9 '17 at 16:57
1
@Hunter.S.Thompson, note the OP should also modify/etc/skel/.bashrc(or the equivalent) to remove any aliases which should not be added to a new user's.bashrcwhen a new user is added to the system.
â user4556274
Aug 9 '17 at 16:59
 |Â
show 3 more comments
2
@Benia, if you are the only user on your system, put all changes in~/.bashrc./etc/bash.bashrcis for settings that are to be shared among all users; then individual users may add additional (or override) settings in their personal~/.bashrc.
â user4556274
Aug 9 '17 at 16:49
2
Definitely DO NOT source.profilefrom/etc/bash.bashrcor any file withrcin the name.
â Jesse_b
Aug 9 '17 at 16:52
Remove anyllaliases from~/.bashrc~/.bash_profileand/or~/.profilefor all users on the machine.
â Jesse_b
Aug 9 '17 at 16:55
I edited the answer, hopefully this will solve your question.
â Hunter.S.Thompson
Aug 9 '17 at 16:57
1
@Hunter.S.Thompson, note the OP should also modify/etc/skel/.bashrc(or the equivalent) to remove any aliases which should not be added to a new user's.bashrcwhen a new user is added to the system.
â user4556274
Aug 9 '17 at 16:59
2
2
@Benia, if you are the only user on your system, put all changes in
~/.bashrc. /etc/bash.bashrc is for settings that are to be shared among all users; then individual users may add additional (or override) settings in their personal ~/.bashrc.â user4556274
Aug 9 '17 at 16:49
@Benia, if you are the only user on your system, put all changes in
~/.bashrc. /etc/bash.bashrc is for settings that are to be shared among all users; then individual users may add additional (or override) settings in their personal ~/.bashrc.â user4556274
Aug 9 '17 at 16:49
2
2
Definitely DO NOT source
.profile from /etc/bash.bashrc or any file with rc in the name.â Jesse_b
Aug 9 '17 at 16:52
Definitely DO NOT source
.profile from /etc/bash.bashrc or any file with rc in the name.â Jesse_b
Aug 9 '17 at 16:52
Remove any
ll aliases from ~/.bashrc ~/.bash_profile and/or ~/.profile for all users on the machine.â Jesse_b
Aug 9 '17 at 16:55
Remove any
ll aliases from ~/.bashrc ~/.bash_profile and/or ~/.profile for all users on the machine.â Jesse_b
Aug 9 '17 at 16:55
I edited the answer, hopefully this will solve your question.
â Hunter.S.Thompson
Aug 9 '17 at 16:57
I edited the answer, hopefully this will solve your question.
â Hunter.S.Thompson
Aug 9 '17 at 16:57
1
1
@Hunter.S.Thompson, note the OP should also modify
/etc/skel/.bashrc (or the equivalent) to remove any aliases which should not be added to a new user's .bashrc when a new user is added to the system.â user4556274
Aug 9 '17 at 16:59
@Hunter.S.Thompson, note the OP should also modify
/etc/skel/.bashrc (or the equivalent) to remove any aliases which should not be added to a new user's .bashrc when a new user is added to the system.â user4556274
Aug 9 '17 at 16:59
 |Â
show 3 more comments
up vote
1
down vote
I'm fairly certain /etc/bash.bashrc isn't a thing. The file you are looking for is $HOME/.bash_profile OR $HOME/.profile Alternatively you could use $HOME/.bashrc but I think profile is the correct file for what you are trying to accomplish.
For an explanation of the difference between .bash_profile and .bashrc please see: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
To source .profile from .bash_profile add the following to your .bash_profile:
if [ -f ~/.profile ]; then
. ~/.profile
fi
Another potential option would be to make ll into a function inside /etc/bash.bashrc instead of an alias which I believe the function will take precedence over any aliases set with the same name.
ll ()
ls -la --group-directories-first
Yea append that to the end of the file.
â Hunter.S.Thompson
Aug 9 '17 at 16:32
1
/etc/bash.bashrcis a thing for global settings. However, ifllis redefined in the user's.bashrc, that will take precedence over the definition in/etc/bash.bashrc
â user4556274
Aug 9 '17 at 16:34
@user4556274 On Mac and CentOS it's just/etc/bashrc
â Jesse_b
Aug 9 '17 at 16:36
1
@Jesse_b, yes, but the OP identified the system as Ubuntu 16.04
â user4556274
Aug 9 '17 at 16:38
1
. ~/.profileis the same assource ~/.profileWhich essentially just executes all commands within that file in the current shell vs executing a script which runs all the commands in a new shell.
â Jesse_b
Aug 9 '17 at 16:54
 |Â
show 5 more comments
up vote
1
down vote
I'm fairly certain /etc/bash.bashrc isn't a thing. The file you are looking for is $HOME/.bash_profile OR $HOME/.profile Alternatively you could use $HOME/.bashrc but I think profile is the correct file for what you are trying to accomplish.
For an explanation of the difference between .bash_profile and .bashrc please see: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
To source .profile from .bash_profile add the following to your .bash_profile:
if [ -f ~/.profile ]; then
. ~/.profile
fi
Another potential option would be to make ll into a function inside /etc/bash.bashrc instead of an alias which I believe the function will take precedence over any aliases set with the same name.
ll ()
ls -la --group-directories-first
Yea append that to the end of the file.
â Hunter.S.Thompson
Aug 9 '17 at 16:32
1
/etc/bash.bashrcis a thing for global settings. However, ifllis redefined in the user's.bashrc, that will take precedence over the definition in/etc/bash.bashrc
â user4556274
Aug 9 '17 at 16:34
@user4556274 On Mac and CentOS it's just/etc/bashrc
â Jesse_b
Aug 9 '17 at 16:36
1
@Jesse_b, yes, but the OP identified the system as Ubuntu 16.04
â user4556274
Aug 9 '17 at 16:38
1
. ~/.profileis the same assource ~/.profileWhich essentially just executes all commands within that file in the current shell vs executing a script which runs all the commands in a new shell.
â Jesse_b
Aug 9 '17 at 16:54
 |Â
show 5 more comments
up vote
1
down vote
up vote
1
down vote
I'm fairly certain /etc/bash.bashrc isn't a thing. The file you are looking for is $HOME/.bash_profile OR $HOME/.profile Alternatively you could use $HOME/.bashrc but I think profile is the correct file for what you are trying to accomplish.
For an explanation of the difference between .bash_profile and .bashrc please see: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
To source .profile from .bash_profile add the following to your .bash_profile:
if [ -f ~/.profile ]; then
. ~/.profile
fi
Another potential option would be to make ll into a function inside /etc/bash.bashrc instead of an alias which I believe the function will take precedence over any aliases set with the same name.
ll ()
ls -la --group-directories-first
I'm fairly certain /etc/bash.bashrc isn't a thing. The file you are looking for is $HOME/.bash_profile OR $HOME/.profile Alternatively you could use $HOME/.bashrc but I think profile is the correct file for what you are trying to accomplish.
For an explanation of the difference between .bash_profile and .bashrc please see: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
To source .profile from .bash_profile add the following to your .bash_profile:
if [ -f ~/.profile ]; then
. ~/.profile
fi
Another potential option would be to make ll into a function inside /etc/bash.bashrc instead of an alias which I believe the function will take precedence over any aliases set with the same name.
ll ()
ls -la --group-directories-first
edited Aug 9 '17 at 16:57
answered Aug 9 '17 at 16:29
Jesse_b
10.5k22660
10.5k22660
Yea append that to the end of the file.
â Hunter.S.Thompson
Aug 9 '17 at 16:32
1
/etc/bash.bashrcis a thing for global settings. However, ifllis redefined in the user's.bashrc, that will take precedence over the definition in/etc/bash.bashrc
â user4556274
Aug 9 '17 at 16:34
@user4556274 On Mac and CentOS it's just/etc/bashrc
â Jesse_b
Aug 9 '17 at 16:36
1
@Jesse_b, yes, but the OP identified the system as Ubuntu 16.04
â user4556274
Aug 9 '17 at 16:38
1
. ~/.profileis the same assource ~/.profileWhich essentially just executes all commands within that file in the current shell vs executing a script which runs all the commands in a new shell.
â Jesse_b
Aug 9 '17 at 16:54
 |Â
show 5 more comments
Yea append that to the end of the file.
â Hunter.S.Thompson
Aug 9 '17 at 16:32
1
/etc/bash.bashrcis a thing for global settings. However, ifllis redefined in the user's.bashrc, that will take precedence over the definition in/etc/bash.bashrc
â user4556274
Aug 9 '17 at 16:34
@user4556274 On Mac and CentOS it's just/etc/bashrc
â Jesse_b
Aug 9 '17 at 16:36
1
@Jesse_b, yes, but the OP identified the system as Ubuntu 16.04
â user4556274
Aug 9 '17 at 16:38
1
. ~/.profileis the same assource ~/.profileWhich essentially just executes all commands within that file in the current shell vs executing a script which runs all the commands in a new shell.
â Jesse_b
Aug 9 '17 at 16:54
Yea append that to the end of the file.
â Hunter.S.Thompson
Aug 9 '17 at 16:32
Yea append that to the end of the file.
â Hunter.S.Thompson
Aug 9 '17 at 16:32
1
1
/etc/bash.bashrc is a thing for global settings. However, if ll is redefined in the user's .bashrc, that will take precedence over the definition in /etc/bash.bashrcâ user4556274
Aug 9 '17 at 16:34
/etc/bash.bashrc is a thing for global settings. However, if ll is redefined in the user's .bashrc, that will take precedence over the definition in /etc/bash.bashrcâ user4556274
Aug 9 '17 at 16:34
@user4556274 On Mac and CentOS it's just
/etc/bashrcâ Jesse_b
Aug 9 '17 at 16:36
@user4556274 On Mac and CentOS it's just
/etc/bashrcâ Jesse_b
Aug 9 '17 at 16:36
1
1
@Jesse_b, yes, but the OP identified the system as Ubuntu 16.04
â user4556274
Aug 9 '17 at 16:38
@Jesse_b, yes, but the OP identified the system as Ubuntu 16.04
â user4556274
Aug 9 '17 at 16:38
1
1
. ~/.profile is the same as source ~/.profile Which essentially just executes all commands within that file in the current shell vs executing a script which runs all the commands in a new shell.â Jesse_b
Aug 9 '17 at 16:54
. ~/.profile is the same as source ~/.profile Which essentially just executes all commands within that file in the current shell vs executing a script which runs all the commands in a new shell.â Jesse_b
Aug 9 '17 at 16:54
 |Â
show 5 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f385009%2foverriding-a-distro-dependent-bash-alias-to-act-a-bit-different%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password