As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [bashrc]

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

Filter by
Sorted by
Tagged with
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 ...
Herbert Qerbert's user avatar
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 ...
Herbert Qerbert's user avatar
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 ...
MetaColon's user avatar
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
Juliet's user avatar
  • 1
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 ...
Ahmet Hakan YILDIZ's user avatar
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 ...
MigWeld-o's user avatar
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. ...
Rolf's user avatar
  • 103
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 ...
VIJITH KUMAR's user avatar
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" ...
BetterEnglish's user avatar
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 ...
Ramin Malekghasemi's user avatar
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 ...
Untitled's user avatar
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 ...
Foad's user avatar
  • 833
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 ...
manodzit's user avatar
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 ...
xslibx's user avatar
  • 101
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 ...
john smith's user avatar
  • 2,913
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
Manohar Reddy's user avatar
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 ...
Rich Hard Fine Man's user avatar
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 ~...
soltex's user avatar
  • 111
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 ....
Tatty Man's user avatar
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 -...
officialrajdeepsingh's user avatar
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 ...
Naveen Kumar's user avatar
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 ...
pklein's user avatar
  • 21
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 ...
Sung Jinwoo's user avatar
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/...
MohammadBaqer's user avatar
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-...
Vishal Sharma's user avatar
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.
temirlan_ulan's user avatar
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 ...
Mubaris Kunnath's user avatar
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 ...
Dave's user avatar
  • 173
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 ...
M11 's user avatar
  • 11
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" ...
Mohammad Moshfeghi's user avatar
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). ...
Yes's user avatar
  • 101
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 ...
Jacob's user avatar
  • 5
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 ...
Dany's user avatar
  • 81
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 ...
Tolga Karabiyikoglu's user avatar
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
Adrián Núñez Martínez's user avatar
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 ...
kennr's user avatar
  • 11
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 ~/....
MDeBusk's user avatar
  • 1,061
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 ...
Richard Quint's user avatar
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 ...
ixodid's user avatar
  • 113
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 ...
BlackSlime's user avatar
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 ...
ebsf's user avatar
  • 449
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 ...
box cpm's user avatar
  • 11
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 ...
krillavilla's user avatar
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 ...
user avatar
-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 ...
raul999's user avatar
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 ...
Aviator's user avatar
  • 131
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 ...
lam206's user avatar
  • 37
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 ...
PrometheusRising's user avatar
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 ...
ShlickMitch's user avatar
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 ...
Mario Palumbo's user avatar

1
2 3 4 5
16