Where is the .bashrc or .zshrc file?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Where is the .bashrc or .zshrc file?

Post by April »

Can someone tell me where I can find the ."bashrc" file?
I want to add to the PATH variable but its been a while since I've needed to.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

TerryH
Posts: 637
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 158 times
Been thanked: 160 times

Re: .bashrc or .zshrc etc.

Post by TerryH »

/root/.bashrc (turn on view hidden files)

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: .bashrc or .zshrc etc.

Post by April »

Yes thats where I went first but its not there in xenialpup64-7.5
Or not in mine anyway
Can I do it in etc/.profile or is there a better way ?

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
user1234
Posts: 414
Joined: Sat Feb 26, 2022 5:48 am
Location: Somewhere on earth
Has thanked: 155 times
Been thanked: 90 times

Re: .bashrc or .zshrc etc.

Post by user1234 »

April wrote: Wed Mar 30, 2022 10:55 pm

Yes thats where I went first but its not there in xenialpup64-7.5
Or not in mine anyway
Can I do it in etc/.profile or is there a better way ?

.bashrc should be in your user's home folder (i.e. ~/). If it's not there then create it.

In fossapup the first line of .bashrc is

Code: Select all

. /etc/profile

which is like including /etc/profile.

(Remember to export your variable, else it will not changed).

PuppyLinux 🐾 gives new life to old computers ✨

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: .bashrc or .zshrc etc.

Post by April »

Well I don't know about that . Its not there and everything works fine so why would I need ~/.bashrc ?
My profile file seems to be being loaded anyway from somewhere else .

I have not deleted it as far as I know . I'll try a new load of Xenialpup64 and see if its in that.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
OscarTalks
Posts: 623
Joined: Tue Jul 14, 2020 10:11 pm
Location: London UK
Has thanked: 2 times
Been thanked: 247 times

Re: Where is the .bashrc or .zshrc file?

Post by OscarTalks »

I booted a fresh (pfix=ram) frugal of XenialPup64 and /root/.bashrc is there
You can add other locations to PATH system-wide by editing /etc/profile
Use a colon as the separator between each of the paths in the string

User avatar
rockedge
Site Admin
Posts: 6539
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2746 times
Been thanked: 2619 times
Contact:

Re: Where is the .bashrc or .zshrc file?

Post by rockedge »

each user in a multi-user system has a ./bashrc or ./bash_profile in it's /home/<username> directory. Puppy Linux though is not but also good idea to add a .bashrc into user spot's home directory

having the .bashrc is proper Linux. Puppy Linux also determines what the terminal consoles look like via the PS1= environment variable.

In this example from a Bionic64-8.0 that I have added some settings for SnowMix which is open source television broadcast software. The mixer board that blends video cameras and audio inputs and graphics/text

Code: Select all

./etc/profile

umask 022

PS1="\[\e]2;\w\a\e[1:32m\]$USER-\\$ \[\e[0m\]"

# enable Pkg 1.9.22 TAB completion
export PKG_TAB_COMPLETION=true
. /etc/bash_completion.d/pkg 2>/dev/null

export SNOWMIX=/usr/lib/Snowmix-0.5.1.1
export SM=/usr/lib/Snowmix-0.5.1.1
Post Reply

Return to “Users”