Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: julcar on December 03, 2020, 05:02:56 AM

Title: What are the differences between ~/.ashrc & ~/.profile ??
Post by: julcar on December 03, 2020, 05:02:56 AM
Hi all,

I am using Core (not gui), and I want to export a couple of variables at boot time, but looks like using bootlocal.sh is a short but not the proper way to do it.

I am using these bootcodes:

Code: [Select]
norestore tce=sda1 home=sda1 opt=sda1
In /home/tc I can see two files that seems to be init scripts: .ashrc and .profile but I never touched them, so I would like to know what are the differences between both and which would be the best option for my needing.

Thanks.
Title: Re: What are the differences between ~/.ashrc & ~/.profile ??
Post by: hiro on December 03, 2020, 06:22:59 AM
.profile is included regardless of which shell you are using, .ashrc is only read by the ash shell (from busybox). for example if you use bash .ashrc will not be read at all.
Title: Re: What are the differences between ~/.ashrc & ~/.profile ??
Post by: curaga on December 03, 2020, 12:54:32 PM
The other part is "when". .(b)ashrc is run on every shell, while .profile is run on login. This doesn't matter for exported variables, but for commands it does.