Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 31 Oct 2014, 03:17
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to make ALIAS commands permanent in Puppy?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
puppypilgrim

Joined: 07 Jun 2005
Posts: 83
Location: Vancouver, Canada

PostPosted: Tue 07 Jun 2005, 03:52    Post_subject:  How to make ALIAS commands permanent in Puppy?  

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.
Back to top
View user's profile Send_private_message YIM 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Tue 07 Jun 2005, 13:46    Post_subject:  

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
Back to top
View user's profile Send_private_message 
puppypilgrim

Joined: 07 Jun 2005
Posts: 83
Location: Vancouver, Canada

PostPosted: Wed 08 Jun 2005, 00:55    Post_subject:  

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.
Back to top
View user's profile Send_private_message YIM 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Wed 08 Jun 2005, 03:45    Post_subject:  

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
Back to top
View user's profile Send_private_message 
puppypilgrim

Joined: 07 Jun 2005
Posts: 83
Location: Vancouver, Canada

PostPosted: Fri 10 Jun 2005, 17:58    Post_subject:  

Thank you for your help Guestoo. I shall try it tonight.
Back to top
View user's profile Send_private_message YIM 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0435s ][ Queries: 11 (0.0036s) ][ GZIP on ]