How to make 'alias' command permanent?? I can use "alias dir="ls -al | more" and it works but when I reboot it is gone.
Running Pizzapup 3.0.1.
Pizzapup 3.0.1: how to make 'alias' command permanent?
First - why create an alias for a Windows command - Esp when it may not always be desireable to be used
with the option parameters of:
(show hidden) and all other data ~
Also "more" is not as useful as the "less" piped command to pause screen output
Second - the usefulness of an aliased command is (partially) to lessen keystrokes of often used tasks
The ultimate would be to use ONE key stroke
(be Damn careful - there are reserved symbols for varied Apps, utilities)
That x-resources file is not even needed -
When used (generally profiled as a default CFG @ install, copied from /etc/skel) ;
it is ONE way to execute user - override preferences of an
X-server desktop environment.
HOW X WORKS
Aliases preferably are to be put into a ~/ (dot) .bashrc file
That too has alternatives
To use immediately:
Otherwise, any aliase just scripted, gets activated NEXT login !
with the option parameters of:
(show hidden) and all other data ~
Also "more" is not as useful as the "less" piped command to pause screen output
Second - the usefulness of an aliased command is (partially) to lessen keystrokes of often used tasks
The ultimate would be to use ONE key stroke
(be Damn careful - there are reserved symbols for varied Apps, utilities)
W H A T -If it fires too soon for some reason, you can run them latter in: (.xinitrc)
That x-resources file is not even needed -
When used (generally profiled as a default CFG @ install, copied from /etc/skel) ;
it is ONE way to execute user - override preferences of an
X-server desktop environment.
HOW X WORKS
Aliases preferably are to be put into a ~/ (dot) .bashrc file
That too has alternatives
To use immediately:
Code: Select all
source ~/.bashrc
yes, the "correct" place to put aliases is in .bashrc ... i don't think it will work to put aliases in rc.local, because the aliases will not be exported to subprocesses
if your shell is set to sh as opposed to bash, starting a sh shell will not execute .bashrc, so your aliases will not work ... you can set ENV to execute an initialization file for sh ... for example, if you put this line in /etc/profile.local:
ENV=/root/.bashrc
then the .bashrc file will execute whenever a new sh, ash, or bash shell is started ... and your aliases should work properly
if your shell is set to sh as opposed to bash, starting a sh shell will not execute .bashrc, so your aliases will not work ... you can set ENV to execute an initialization file for sh ... for example, if you put this line in /etc/profile.local:
ENV=/root/.bashrc
then the .bashrc file will execute whenever a new sh, ash, or bash shell is started ... and your aliases should work properly