during my work I need to constantly add alias commands to bashrc, most of those commands needs to be runed by other users. is there any way I could add alias commands to a bashrc from external source?
Many config files in users home directory just override/add to ones in the
This warning is given for a few Linux systems in the files:
So you could edit those files, you may want to back them up first (
Then open it with
And check whether it works by seeing if it appears in the output of
There's already an accepted answer here, but you might consider using some form of environment modules to handle system-wide configuration of user environments rather than messing with the files in /etc/profile.d, etc. This is especially true if you want to manage this control in one place across lots of shells. Lmod (under very active development), C/TCL modules (the classic solution), or Cmod (lightweight).
and make your alias there.
add your alias in last line.
That alias will become global for all users.
but for security reasons we dont recommend you that.
and add your aliases here.
without effecting your system files. It is safe and right way to work with your environment files.