Pizzapup 3.0.1: how to make 'alias' command permanent?

Using applications, configuring, problems
Post Reply
Message
Author
oldjim
Posts: 15
Joined: Tue 21 Nov 2006, 09:39

Pizzapup 3.0.1: how to make 'alias' command permanent?

#1 Post by oldjim »

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.

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#2 Post by John Doe »

Add your commands to:

/etc/rc.d/rc.local

They should be run on boot up.

If it fires too soon for some reason, you can run them latter in:

/root/.xinitrc

User avatar
Gn2
Posts: 943
Joined: Mon 16 Oct 2006, 05:33
Location: virtual - Veni vidi, nihil est adpulerit

#3 Post by Gn2 »

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)
If it fires too soon for some reason, you can run them latter in: (.xinitrc)
W H A T -

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 
Otherwise, any aliase just scripted, gets activated NEXT login !

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »

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

Post Reply