Questions tagged [bashrc]
.bashrc is the Bash shell configuration file for a user's terminal login session.
758
questions
0
votes
0
answers
43
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? I believe I have only seen temporary solutions, via export PATH=$PATH:<path/to/add> but ...
0
votes
0
answers
37
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
45
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
31
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
183
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
33
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
78
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
34
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
64
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
0
answers
37
views
run service by delay after boot ubuntu 18.0.4
if I want Statrt service For example 10 second after Boot ubuntu
I used this
[Unit]
Description=Start up script
[Service]
Type=forking
ExecStartPre=-/bin/sleep 10
EnvironmentFile==/root/gateway.sh ...
0
votes
1
answer
45
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
44
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
97
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
51
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
52
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
38
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
0
votes
1
answer
247
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
288
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
32
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
2k
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
28
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
244
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
38
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 ...
2
votes
3
answers
4k
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/...
0
votes
1
answer
169
views
bash: /home/vishal/.bashrc: Errors when opening terminal
Everytime I open my terminal , this message pops up. Please tell how to permanently delete this from the terminal?
bash: export: `=': not a valid identifier
bash: export: `/home/vishal/LLVM/llvm-...
0
votes
1
answer
85
views
How to delete the commands that pop up after opening the terminal in Ubuntu 20.04?
enter image description hereenter image description hereEvery time I open a new terminal tab, some startup files try to send commands. And I get this:
What should I do? It's a bit annoying.
0
votes
0
answers
28
views
Bash script not work as expected
#!/bin/bash
gnome-terminal -- ssh -i "my.pem" ubuntu@''''''''''''''''.amazonaws.com && ./remote.sh
I want to connect the server to a new terminal and run the remote.sh command at the ...
1
vote
1
answer
550
views
Ubuntu 20.04 not allowing `runuser` to manage systemd --user services "Failed to connect to bus: No such file or directory"
When I try to run runuser -l mruser -c "systemctl --user status myservice.service" as root, I get the following error:
Failed to connect to bus: No such file or directory
I do not get this ...
0
votes
2
answers
185
views
Terminal is not spitting output after messing with ~/.bashrc file
My Terminal Image:
I'm using Ubuntu with WSL and can't access GUI.
Aforementioned images of my terminal, no output is displaying for anything I type. Terminal is acting like an editor. It happened ...
0
votes
0
answers
73
views
How to give the address of "bashrc" loacted in "./opt/.../etc" in VM?
I am a newbie in Linux. I have a VM on my windows and just installed OpenFOAM10 (https://openfoam.org/download/10-ubuntu/) on my VM. Then, I needed to add "source /opt/openfoam10/etc/bashrc" ...
0
votes
0
answers
145
views
How can I emulate a sudo shell with the respective environment variables set when using "sudo su -c "<command>"?
I would like to run a sudo command in one line, but also have this command be run as a sudo user with all the respective environment variables instantiated (essentially run exec zsh before anything).
...
0
votes
1
answer
221
views
Is the ~/.bashrc file user specific when I am connected to a remote system using Secure Shell (SSH)?
I am doing work on a remote computer using Secure Shell. I would like to add aliases to the ~/.bashrc file, but only if this edit applies to my user only. So the question, as the title states, is ...
1
vote
1
answer
77
views
problem bashrc file colored terminal
I have a problem with my terminal in Ubuntu server 20.04.
I would like to color the syntax in my terminal, but after I restart the server, it's back to the normal uncolored syntax. I edited .bashrc ...
0
votes
1
answer
75
views
PAth misdefinition in .bashrc file
It seems I am a newbee in this Ubuntu world. Yet, somehow I think I just blew up my .bashrc file. Eventually I can no longer issue a ls or chmod or any other commands like sudo joe ~/.bashrc or gedit ...
0
votes
2
answers
2k
views
Changing bash terminal color and setting it back to default?
I found this command to change the background color to back:
echo -ne '\e]11;#000000\e\\'
So, how to I make it to change the default again?
Thanks :3
0
votes
3
answers
3k
views
catkin_init_workspace and catkin_make are commands not found
I have been trying to make an Unbuntu 22.04 ROS2 Humble catkin workspace, but I have been unable to resolve the two command not found errors. Trying to reinstall the catkin package has not been much ...
29
votes
3
answers
7k
views
What goes in ~/.profile and ~/.bashrc?
I'm having trouble wrapping my head around what belongs in ~/.profile and what belongs in ~/.bashrc.
From what I've read, it seems to me that ~/.profile should be used for environment variables and ~/....
1
vote
1
answer
253
views
What kind of shell is a gnome-terminal started by a desktop file?
I am testing running Ubuntu 22.04. I don't understand why when opening a gnome-terminal using a .desktop file $HOME/.bashrc is not read although when running the same command in an open terminal it ...
0
votes
1
answer
69
views
User shiny doesn't seem to "see" .bashrc file
I'm running Ubuntu 20 on a Digital Ocean droplet.
I use R and RStudio's Shiny-Server.
When I use a Terminal logged in as user:me the prompt is customized and the cursor up error brings up the previous ...
1
vote
1
answer
121
views
Terminal Appearance Problem
linux noob here. I'm configuring the appearance my terminal via some commands like:
vi $HOME/.bashrc
then
add do this command export PS1="\e[0;32m[\u@\h \W]$ \e[m "
and now my terminal ...
0
votes
0
answers
142
views
bash.bashrc alias fail: Why?
This is a permutation of the question here.
This question differs in that (a) it relates to commands entered as root in a terminal as opposed to commands entered as a non-root user by invoking sudo ...
0
votes
1
answer
152
views
Messed up bash prompt after printf
This annoying bug bothered me. When I type printf foo or echo -n foo, the bash prompt next becomes glitchy when I navigate through previous commands. Here is a snippet of my .bashrc
...
7
votes
2
answers
1k
views
Theres empty space between cursor and username in konsole Kubuntu 21.10
This is a brand new installation of Kubuntu 21.10 and I cannot understand why there is space between the cursor and my PC's name when I open Konsole:
I have tried researching for a solution and I ...
0
votes
2
answers
299
views
Sudo aliased to please; how do i make please see aliases?
I made sudo see aliases with alias sudo='sudo '. I aliased sudo to please (alias please=sudo), and with please it didn't worked: alias please='please '. please still didn't see my aliases.
How to make ...
-1
votes
1
answer
1k
views
Terminal auto-completion does not work
The auto-completion in the terminal doesn't work that means that nothing happens.
Ubuntu version is 20.04 LTS
a) echo $SHELL is /bin/bash
b) I reinstalled the bash completion package with
sudo apt-get ...
0
votes
1
answer
1k
views
how to add alias as a command in bashrc [duplicate]
In my bashrc i want to add an alias which would run a shell script.
I am trying the below :-
export termlist=/usr/data/log
export runterm=cd $termlist; bash termlist.sh
termlist.sh is the shell ...
1
vote
1
answer
176
views
function definition not working in .bashrc
submit () {
kaggle c submit -f $@ -m MSG h-and-m-personalized-fashion-recommendations;
}
I want to use the above function as shorthand for submitting files to kaggle competitions by typing submit ...
0
votes
3
answers
528
views
Where to Source your .Profile (Ubuntu 21.10)
Recent instructional video I was watching said to put your export PATH="$PATH..." statement in your .profile and after sourcing manually in the terminal to append ". ~/.profile" to ...
0
votes
2
answers
4k
views
Bash errors: Unexpected EOF while looking for matching, Syntax error: Unexpected end of file
I ran it through ShellCheck but could not understand what it wanted me to change,so here I am.
On opening terminal:
bash: /home/helpabrother/.bashrc: line 118: unexpected EOF while looking for ...
2
votes
1
answer
99
views
bash: `set +m` option does not work when placed in the .bashrc file
If I enter the command:
set +m
at the end of the .bashrc file, when I run the command:
echo $-
the option m is missing as it should be, but...
If I enter the command:
{ sync & } 2> /dev/null
...