.bashrc is the primary configuration file for the bash shell.
Questions tagged [bashrc]
447 questions
5
votes
2 answers
When should I use .bashrc and when .profile?
I am basically putting all my settings into my .bashrc and when I was using zsh it was all in my .zshrc.
The Rust installer just informed me that it has added the new installation to my PATH by modifying .profile.
When should things go into…

Franklin
- 235
5
votes
2 answers
environment variables not detected in .bashrc and .profile
I tried to create an environment variable in my ~/.bashrc file as follows:
export DJANGO_DEVELOPMENT=true
After doing some troubleshooting it appears bash isn't picking up the new environment variable at all. I tried setting it in ~/profile but that…

Brian Lee
- 149
4
votes
1 answer
How to remove path from terminal prompt in Debian?
From command line, long directory paths can take up the entire line:
Similar questions have been asked:
Hides directory path in terminal
Remove "PWD" from terminal
Remove full path from terminal
Show only current directory name on bash…

Kelly
- 278
3
votes
1 answer
What controls the home directory in applications like Geeqie and Thunar?
I have a line in my .bashrc that cd's to a specific directory. For as long as I can remember, this only changed the directory in which terminal sessions began. But then at some point recently, GUI applications such as Geeqie and Thunar also began to…

jl6
- 1,455
- 2
- 14
- 29
2
votes
5 answers
remove an added path from PATH?
in my ~/.bashrc in Linux , I have a line that adds some paths to PATH, something like:
PATH=~/mydoc:~/mypython:"$PATH"
The purpose of adding ~/mypython is to use my self-installed python, rather than the system's default one. But now I would like…

Tim
- 101,790
1
vote
2 answers
How to find out the right String syntax for my bash?
I am getting an error message for this alias:
alias ejectall='osascript -e 'tell application "Finder" to eject (every disk whose ejectable is true)''
And here is the error message:
-bash: .bashrc: line 15: syntax error near unexpected token…

ohboy21
- 113
1
vote
2 answers
How to format history file to contain username too?
tail -2 /root/.bashrc
export HISTTIMEFORMAT="%d/%m/%y %T "
export PROMPT_COMMAND='builtin history 1 >> /var/log/root.log'
With this all the commands could be logged (even the ones that were in "sudo su -" ).
My question: How can I put username…

newuser999
- 503
0
votes
1 answer
explanation of PS1 in bashrc
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
I tried experimenting with this line a lot and was able to get a few characters, but I still don't get the complete meaning of the line. Can…
user324028
0
votes
1 answer
Modifying bashrc with xrandr doesn't work?
I added the following line to my bashrc:
alias b="xrandr --output HDMI-1 --brightness"
When I open another terminal and run b, b 0.1, or b 1 it says that command "b" is not found.
I have a similar line for vim that works fine though:
alias…

mtheorylord
- 123
0
votes
1 answer
I can't find .bashrc on distro astro
I'm using distro astro 3, I tried to add something to .bashrc but I couldn't find it.
When I ran the command ls -a ~, I could find only .bash_history & .bash_logout should I create a .bashrc or is there another shell being used for distro astro?

Ola Ali
- 1
-3
votes
1 answer
bash: syntax error near unexpected token `"firsttry.c"'
My code---
#include
int main(void)
{
printf("hello, world\n");
}
and I get bash: syntax error near unexpected token `"firsttry.c"'

gene
- 1