Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [bashrc]

.bashrc is the Bash shell configuration file for a user's terminal login session.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
34 views

~/.bashrc file is not source when running the script

When trying to execute hard coded ssh script via jump server to the application host the connectivity is successful, but the ~./bashrc file is not sourcing. Ubuntu version - "22.04"
Kanishka's user avatar
0 votes
1 answer
41 views

`export` doesn't appear in `~/bashrc`

I want to install a LAMMPS software simulator, and I'm doing the same steps outlined in this video: https://youtu.be/-cYhA2wFGWs, but when I try to add the export to ~/.bashrc the rest of the code ...
HAIDAR ABBAS's user avatar
2 votes
1 answer
55 views

How is ~/.local/bin getting on my PATH

I noticed an anomaly with how my PATH is being configured on a new install of 22.04. Initially ~/.local/bin appeared twice. I reduced it to one time by commenting out the relevant block in ~/....
Dave's user avatar
  • 392
3 votes
1 answer
127 views

color variable does not work with PS1 assignment in bashrc file

below is my current PS string in .bashrc PS1='${debian_chroot:+($debian_chroot)}\[\033[00;37m\]\u@\h\[\033[01;32m\]:\[\033[01;34m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ which works fine ...
xkeshav's user avatar
  • 627
0 votes
1 answer
139 views

How to fix unresponsive Terminal

My Terminal does Not respond. I can Open it but when I try to type something, it gets ignored. I cant See the letters on the Terminal - They are Not hidden. I tried 2 other Terminals, Same Problem. I ...
Katharina J's user avatar
0 votes
0 answers
142 views

removing zsh broke my terminal

I ran this code sudo apt-get --purge remove zsh to delete zsh and now my terminal has this output: and when accessing through powershell: <3>WSL (556) ERROR: CreateProccessEntryCommon:502: ...
user19481451's user avatar
7 votes
2 answers
1k views

Should I put functions in .bashrc, .bash_aliases or .profile

I have read this thread about where to put aliases. Now, let's suppose that my custom command is quite elaborate (takes arguments in input, is composed of several commands run one after the other, I ...
Tms91's user avatar
  • 405
1 vote
0 answers
36 views

Reverse search fails when commands are present in bash_history

Ubuntu 22.04, from terminal I type ctrl+r and mosquitto_sub it finds mosquitto_sub --help and nothing else. But: # cat .bash_history | grep mosquitto_sub mosquitto_sub --help mosquitto_sub -t foo1/# -...
Mark's user avatar
  • 517
2 votes
1 answer
596 views

How do I avoid having to manually source ~/.profile or ~/.bashrc to get "LD_LIBRARY_PATH" to work?

I realized that I need to manually source ~/.bashrc file or to manually source .profile file to make the settings specified in .bashrc file effective. These are some additions to complete ~/.bashrc ...
Raphael10's user avatar
  • 183
0 votes
1 answer
406 views

command not found: shopt ON WSL Ubuntu 22.04

I inserted couple of env. variables such as: export WOS_MONGODB_URI='mongodb://localhost:27017/...' export WOS_AWS_REGION='us-east-2' export WOS_AWS_ENV='dev23' export WOS_SEED_MODE='test' export ...
Damika's user avatar
  • 101
1 vote
0 answers
1k views

How to reload .bashrc settings without logging out and back in again?

I created a script that add's the below commands to the .bashrc file. The purpose is I need to store the commands entered by the user into the .bash_history. The below commands are adding to .bashrc ...
SIVA KUMAR KALLURI's user avatar
1 vote
1 answer
203 views

How to restore /root/.bashrc as sudo su is giving segmentation fault (core dumped)

I've a dedicated remote web server. I messed up /root/.bashrc file by adding source /root/.bash_profile. It core dumps on sudo su. $ sudo su Segmentation fault (core dumped) I can't login to server ...
Raymond's user avatar
  • 156
1 vote
0 answers
428 views

I'm trying to launch rplidar but I'm getting a timeout error

I've set up ROS noetic in my Raspberry Pi 4 B with Ubuntu 20.04. I want to make a map with my LiDAR, so I started by installing rplidar. However, when I run roslaunch rplidar_ros rplidar.launch (after ...
Flamethrower's user avatar
3 votes
1 answer
407 views

Bash alias for removing docker images does not use force flag

Currently I have an alias to force remove images, the command is something like: docker rmi $(docker images | grep pattern | grep -v other_pattern | tr -s ' ' | cut -d ' ' -f 3) -f Within my ~/....
jkgfinai's user avatar
1 vote
1 answer
222 views

Which environment variable controls the location of .local directory?

Due to storage space constraints in my home directory, I need to move as much out of there as possible. I have moved caches and configs out by setting the $XDG_CACHE_HOME and $XDG_CONFIG_HOME ...
Joff's user avatar
  • 504
0 votes
1 answer
170 views

bash: export: `LS_COLORS#': not a valid identifier

I'm getting the following error in my terminal: bash: export: `LS_COLORS#': not a valid identifier My ~/.bashrc file looks like this: # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/...
MANIKANDAN S's user avatar
1 vote
1 answer
69 views

How to do partial history search without sticky matching

If I put this in my .bashrc: bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward' It mostly works, but if I go up and don't like the match, I can't go back ...
Mastiff's user avatar
  • 165
0 votes
1 answer
1k views

How to "source ~/.bashrc" automatically when connect to remote

I need to create some aliases on remote Ubuntu and enable them on ssh-connection. So I defined aliases in ~/.bashrc file (on that remote Ubuntu). Now when I do ssh root@<Remote IP> source ~/....
JaSON's user avatar
  • 123
0 votes
0 answers
43 views

Pycharm does not launch from other directory even after editing .bashrc, .profile and .environment

I downloaded PyCharm, and from the directory where the executable pycharm.sh is, it works fine, however, whenever I do sudo vim ~/.profile, sudo vim ~/.bashrc, and add export PATH="$HOME/pycharm-...
XXX's user avatar
  • 1
0 votes
1 answer
204 views

How to add code to .bashrc without causing errors?

I'm learning how to passthrough my NIC to my KVM. This guide says to add the following code to the file ~/.bashrc #!/bin/bash # change the 999 if needed shopt -s nullglob for d in /sys/kernel/...
user1416486's user avatar
0 votes
0 answers
355 views

Running OpenFoam command: paraFoam -> Error 420: paraView: not found

I have lately installed OpenFoam v.2212.0 on UBUNTU 22.04.0. All the other OpenFoam commands work fine for me, but as soon as I type "paraFoam", I get the following error: Invalid $...
Lt Ark Angel's user avatar
0 votes
0 answers
111 views

Bash sourced files work properly after initial input into terminal

I am messing with my bash setup, and I decided to move it to version control, I made a couple of changes, and moved the .bashrc and .bash_profile to my dotfiles repo. This seems to have caused quite ...
Nikola-Milovic's user avatar
0 votes
1 answer
62 views

How do I get the terminal to stop outputting additional text from basic bash commands?

I am not sure what exactly is the name of this supplemental text that pops up whenever I am using the terminal, but it shows up when I am running commands. Previously it was not there. I made some ...
Daniel's user avatar
  • 1
0 votes
0 answers
33 views

sudo apt update Received 11 errors. Don’t know what to do [duplicate]

When I wrote sudo apt update I received 11 different errors. I took a screenshot could someone help me fix this. I’m extremely new to Linux bash commands. I just took a 5hour class on the “50 most ...
Handyman-Girl's user avatar
0 votes
0 answers
162 views

Unbuntu is not showing effects of the command line {eval "$(starship init bash)"} in .bashrc

OS: Windows 10 Terminal: Unbuntu, git bash I tried to load starship shell prompt in ubuntu which is opened from my wezterm terminal simulator. By running echo $0, the terminal returns -bash. Thus I ...
HugoWang's user avatar
2 votes
1 answer
637 views

how to add alias to bashrc and load content with sudo?

I need to run my script with sudo, because it includes commands for installing programs with apt. So I do this: sudo ./myscript.sh With content: #!/bin/bash # add alias .bashrc (work) echo "...
acgbox's user avatar
  • 2,210
0 votes
0 answers
62 views

installation issues with musrffit using CERN/ROOT

I successfully installed root. After this, I set the environment variables (in .bashrc) as follows export ROOTSYS=/home/joydev/root/root-6.28.04-install export PATH=$ROOTSYS/bin=:$PATH Then I ...
Joydev's user avatar
  • 11
1 vote
1 answer
82 views

How to modify the path bash: /home/joydev/home/joydev/root/root-6.28.04-install/bin/thisroot.sh: No such file or directory

could you please clarify how to solve the following problem? Whenever I am opening the terminal I am getting following message: bash: /home/joydev/home/joydev/root/root-6.28.04-install/bin/thisroot.sh:...
Joydev's user avatar
  • 11
-1 votes
2 answers
412 views

Accidentally changed PATH variable and I cant change it back, or use vim etc..help

I know there are many questions like this, but I unfortunately dont know enough about Ubuntu to be able to apply it to my situation. I have all my stuff saved for work on a remote machine, that i ...
Learn4life's user avatar
0 votes
1 answer
342 views

Dot gitconfig file not reflecting when switch user on ubuntu 22.04 lts

Today I have installed Ubuntu22.04LTS. In that, i had a user bob and his git config is like user.name=Bob B [email protected] alias.unadd=reset HEAD I Had another user named quealy . when i ...
Vikram 's user avatar
0 votes
0 answers
2k views

export path to $PATH via shell script

Is there some best practice of adding a path to $PATH via a shell script permanently via a shell script and have it accessible? I believe I have only seen temporary solutions, via export PATH=$PATH:&...
Herbert Qerbert's user avatar
0 votes
0 answers
78 views

~/.bashrc displays entries depending on how it is called

I am trying to export a new directory "foo" to $PATH using a shell script. For now I used a shell script install.sh that exports the path like this: <install.sh> #! /bin/sh echo ...
Herbert Qerbert's user avatar
0 votes
0 answers
164 views

torsocks in .bashrc breaks Tor Browser

I activate torsocks in my .bashrc, so that every command I run by default gets routed through tor: # ~/.bashrc: executed by bash(1) for non-login shells. # ... . torsocks on This works fine, except ...
MetaColon's user avatar
0 votes
1 answer
62 views

Error found when loading /home/juliet/.profile

The image above is the error I get when I boot my system. Please does anyone know what this means? And how can I solve it? The laptop is HP omen 15
Juliet's user avatar
  • 1
3 votes
1 answer
1k views

"sudo command" not working, but after sudo su when I enter command is working [duplicate]

My Ubuntu version is Ubuntu 22.04.2 LTS. I have one user (ahmet) and it is member of sudo. I download intellij idea and I want to use its mvn lib for everyone. I edited /etc/bash.bashrc as in this ...
Ahmet Hakan YILDIZ's user avatar
1 vote
0 answers
35 views

Ubuntu/opt directory permission denied issue [duplicate]

Ubuntu Newbie here! I am currently trying to install OpenFoam 10 in my machine, and need to edit the bashrc file located in Ubuntu/opt/openfoam/etc. Anytime I try to manually open the file and edit it ...
MigWeld-o's user avatar
0 votes
2 answers
331 views

Opening gnome-terminal and running a command that uses environmental variables from .bashrc

I am making a .sh file that would be run by Right click -> Run as program by non-power-users. It should open a terminal window and run a docker run command, that uses some environmental variables. ...
Rolf's user avatar
  • 103
0 votes
0 answers
49 views

How can I add a directory to my path and add a command to .bashrc? I am working with Supernova-2.1.1 of 10X Genomics

I would like to add a directory to my path, in my IBM server running Ubuntu 22.04. I would like to install the genome assembly software, SuperNova-2.1.1 by 10x genomics. In order to start using their ...
VIJITH KUMAR's user avatar
0 votes
2 answers
210 views

Alias path not found on Ubuntu

I installed kind from kubeflow kind and save it under my $HOME/kubeflow/kind To run kind from any path, I create an alias in my ~/.bashrc as following: alias kind="./$HOME/kubeflow/kind" ...
BetterEnglish's user avatar
0 votes
1 answer
79 views

History file was rewritten

I had more then 5K records in my history file on Ubuntu 22.04. But for 5 last months I used my computer only by ssh and now I found that .bash_history file was rewritten with only ssh sessions. And I ...
Untitled's user avatar
0 votes
1 answer
328 views

when sourcing a bashrc how to get the line number of the error messages

Following this post, I am souring a bashrc file inside the WSL2/Ubuntu by: source /usr/share/openfoam/etc/bashrc but I get lots of error messages: -bash: /usr/share/openfoam/bin/<someFile>: No ...
Foad's user avatar
  • 873
0 votes
0 answers
105 views

adding permanent custom environment path variable

i am trying to create a permanent path variable following this tutorial: https://youtu.be/JLjF75b-vMI?t=126 everything worked fine and i was able to cd to my newly added variable's directory, however ...
manodzit's user avatar
0 votes
0 answers
121 views

How to give display access to a non-interactive shell using .bashrc

I have a worker that is running in a non-interactive shell. The worker is needing to open up a chrome browser to do scraping, but we are getting a chrome not reachable error due to the worker not ...
xslibx's user avatar
  • 101
0 votes
1 answer
55 views

.bash_profile guidance

I want to know if there is any guidance I should be following somewhere (maybe from a man page or something) regarding creation of a ~/.bash_profile. By default Ubuntu 18.04 doesn't have one, it just ...
john smith's user avatar
  • 3,043
0 votes
0 answers
97 views

When im trying to open terminal the terminal is totally blank there is nit even a durectory or $ appearing while opening the terminal?

When im trying to open terminal the terminal is totally blank there is nit even a durectory or $ appearing while opening the terminal? What should i do now? Please guide me step by step
Manohar Reddy's user avatar
1 vote
1 answer
726 views

Can't Create a Permanent Alias In Fish Shell

I'm trying to create a permanent alias. I've created one long ago, but I don't remember if I did anything differently than what I'm doing now. Be as it may, it isn't working! I start by opening the ...
Rich Hard Fine Man's user avatar
1 vote
0 answers
515 views

eval expression within shell script returns exit code 1

I am using ubuntu 18.04 to run a shell script, and the eval expression returns an exit code 1: #!/bin/bash set -e export DEBIAN_FRONTEND=noninteractive git clone https://github.com/asdf-vm/asdf.git ~...
soltex's user avatar
  • 111
1 vote
0 answers
44 views

How to write an override to prevent an application from launching?

I am looking for help to write a script or terminal command by which I can prevent an app from launching. Let us call this script .bash_ban for instance. Is it possible to write up a command in ....
Tatty Man's user avatar
  • 101
1 vote
2 answers
4k views

"Command not found" errors from terminal, even though the software is installed

I know ubuntu comes with a gnome-terminal. A few days ago, I started to face a new issue that I can't describe. I use the vscode code editor in my daily life. Many commands, like npm,pnpm, yarn, rust -...
officialrajdeepsingh's user avatar
0 votes
0 answers
31 views

ssh can access master but not the devices connected to the master

Hi im trying to connect to the master computer using ssh (linksys-wify), its not showing any errors when connecting, but when trying to see the list of devices connected in my master computer using ...
Naveen Kumar's user avatar

1
2 3 4 5
16