How to make ALIAS commands permanent in Puppy?

Using applications, configuring, problems
Post Reply
Message
Author
puppypilgrim
Posts: 85
Joined: Tue 07 Jun 2005, 06:32
Location: Horsefly, Canada
Contact:

How to make ALIAS commands permanent in Puppy?

#1 Post by puppypilgrim »

I have a set of ALIAS commands I wish to have available in Puppy once it boots. How do I make these Alias commands permanent every time Puppy starts up?

Thanks.

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

#2 Post by GuestToo »

it should work if you put the alias commands in /etc/profile

profile will probably be replaced when you upgrade Puppy, so it's good to backup profile before upgrading to a new version

puppypilgrim
Posts: 85
Joined: Tue 07 Jun 2005, 06:32
Location: Horsefly, Canada
Contact:

#3 Post by puppypilgrim »

GuestToo wrote:it should work if you put the alias commands in /etc/profile

profile will probably be replaced when you upgrade Puppy, so it's good to backup profile before upgrading to a new version
I found etc/profile but have no idea how to edit the file to get alias commands to be permanent for the session. I was looking for an executable where I could edit something like .ash_aliases or .ashrc or something to that effect for systemwide settings.

Thanks.

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

#4 Post by GuestToo »

right click the profile file in /etc ... click Open As Text

put you aliases somewhere in profile
probably a good place is after:
export HOSTNAME
export SHSQL_DB
export PRINTER

just paste in your aliases, something like:

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias cls='clear'
alias ll='ls -lh'

/etc/profile should be executed when a login shell is run ... that is, when Puppy first boots ... /etc/profile should be executed whether busybox-ash is the login shell or bash (executed as sh) is the login shell

sh (busybox or bash) should not run /etc/profile if it is not run as a login shell

if bash (as bash, not as sh) is run as a non-logon interactive shell, it should run .bashrc ... bash run as a login shell should run .bash_profile ... it can be a bit complicated, a lot of people put everything in .bashrc and source .bashrc from profile files

puppypilgrim
Posts: 85
Joined: Tue 07 Jun 2005, 06:32
Location: Horsefly, Canada
Contact:

#5 Post by puppypilgrim »

Thank you for your help Guestoo. I shall try it tonight.

Post Reply