Questions tagged [bashrc]
.bashrc is the Bash shell configuration file for a user's terminal login session.
783
questions
-2
votes
0
answers
17
views
help ! my VENV theming only applies when i source .bashrc but my git theming work tho
if [ "$color_prompt" = yes ]; then
#151;151;26 FADED GREEN
curve_top=$'\U256d'
curve_bot=$'\U2570'
hline=$'\U2500'
vline=$'\U2502'
arrow=$'\U25B6'
logo_bg=$(tput setab 2)
...
0
votes
1
answer
57
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 ...
0
votes
0
answers
52
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: ...
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 ...
1
vote
0
answers
25
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/# -...
2
votes
1
answer
562
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 ...
0
votes
1
answer
168
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 ...
0
votes
0
answers
699
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 ...
1
vote
1
answer
126
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 ...
1
vote
0
answers
322
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 ...
3
votes
1
answer
394
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 ~/....
1
vote
1
answer
209
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 ...
0
votes
1
answer
149
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/...
1
vote
1
answer
54
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 ...
0
votes
1
answer
699
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 ~/....
0
votes
0
answers
40
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-...
0
votes
1
answer
154
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/...
0
votes
0
answers
298
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 $...
0
votes
0
answers
91
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 ...
0
votes
1
answer
56
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 ...
0
votes
0
answers
28
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 ...
0
votes
0
answers
137
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 ...
2
votes
1
answer
536
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 "...
0
votes
0
answers
53
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 ...
1
vote
1
answer
78
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:...
-1
votes
2
answers
332
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 ...
0
votes
1
answer
251
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 ...
0
votes
0
answers
1k
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:&...
0
votes
0
answers
66
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 ...
0
votes
0
answers
145
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 ...
0
votes
1
answer
46
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
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 ...
1
vote
0
answers
34
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 ...
0
votes
2
answers
263
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.
...
0
votes
0
answers
47
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 ...
0
votes
2
answers
187
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"
...
0
votes
1
answer
74
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 ...
0
votes
1
answer
277
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 ...
0
votes
0
answers
102
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 ...
0
votes
0
answers
95
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 ...
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 ...
0
votes
0
answers
87
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
1
vote
1
answer
642
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 ...
1
vote
0
answers
490
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 ~...
1
vote
0
answers
41
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 ....
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 -...
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 ...
1
vote
1
answer
409
views
Able to connect to server via ssh but not via sftp (bash -> zsh)
OS: Ubuntu 20.04
Hello everyone,
I am able to connect to a remote machine via my terminal:
ssh remote_name
Nonetheless I cannot connect via sftp (thus not able to use Nautilus to access my remote ...
0
votes
1
answer
43
views
$PATH is different for startup programs
I have a .sh file with echo $PATH. When opening a terminal, the PATH is how it is supposed to be, it includes all the additions in .bashrc.
I open the startup menu and set this script to run on ...
3
votes
3
answers
11k
views
export PATH="/usr/bin:$PATH" needed for every single command
so I was trying to set JAVA_HOME variable and some how I ended up facing this error every time I want to use terminal
Command 'poweroff' is available in the following places
* /sbin/poweroff
* /usr/...