Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [bashrc]

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

0
votes
0answers
13 views

PYTHONPATH in .bashrc? .profile? Errors when upgrading from Ubuntu 16 to 18

I upgraded my Ubuntu to 18.10 from 1, and now I am having problems with some of my settings. I used Anaconda python, and when trying to load one of my custom libraries, I get this: ---> 13 from ...
0
votes
1answer
22 views

How to install google protoc by placing binary somwhere in PATH

I downloaded the protoc zip file here : https://github.com/protocolbuffers/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip (its a <2MB file) The installation instructions say that ...
0
votes
0answers
24 views

LD_LIBRARY_PATH is unset somewhere, but where? [duplicate]

I'm running an ubuntu work station, and somewhere my LD_LIBRARY_PATH global variable is being unset, but I can't find where. Not in my .bashrc, not in my .profile, not in /etc/bash/bashrc. I am ...
1
vote
1answer
105 views

.bashrc and .bash_profile not created with adduser but created with useradd [duplicate]

I am adding a user named 'test' in my Ubuntu 18.04 server. When I add the user using adduser, like this: sudo adduser --system --group test --shell /bin/bash all goes well, I can login fine, but ....
-1
votes
0answers
55 views

Color the prompt and make changes permanent [duplicate]

I want to change the color of the prompt. I changed the bashrc file and saved the changes using nano . But the changes are not permanent. They are lost when I close the terminal. I tried solutions ...
-2
votes
1answer
377 views

syntax error near unexpected token `newline' in .bashrc [closed]

I'm trying to add script function proxyset() { proxy_enabled=true NO_PROXY_DOMAINS=".abc.com," LOCAL_ADDRESSES="localhost" USER=<USER_ID> PASSWORD=<...
0
votes
1answer
76 views

python stack traces on login and after apt-get update

After my latest dist-upgrade, I'm now getting python stack traces on logging in/starting bash: Last login: Wed Nov 28 19:33:57 2018 from x.x.x.x Traceback (most recent call last): File "/usr/lib/...
0
votes
1answer
68 views

Ubuntu 18.04 on startup error, [-f: command not found

I booted to installed Ubuntu 18.04 on my system and faced the error and pressing Ok button does not work The only thing I did was following the react-native installation instruction: created a ....
1
vote
1answer
34 views

Cannot export PS1 over SSH

Trying to customize shell prompt on a Ubuntu 18 LTS server over SSH. On the server, the .profile sources .bashrc correctly, and .bashrc has force_color_prompt=yes uncommented. The prompt is not ...
1
vote
1answer
30 views

Where is LD_LIBRARY_PATH and PATH?

I type echo $LD_LIBRARY_PATH and got /usr/local/cuda-9.0/lib64 but when I check my bashrc file they are not there. Where are they ? # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/...
0
votes
2answers
97 views

How to reload .bashrc in the shell calling a script [duplicate]

How do I force the shell I called a script from to reload .bashrc from inside the script? I'm trying to make a "new box" script that sets everything up the way I like it. Everything works, except for ...
0
votes
0answers
21 views

Apache authentication loop after installing NVM? [duplicate]

I installed nvm, now whenever I open a new terminal or load bash profile it continuously tries to restart apache & an authentication password prompt pops up. I can't seem to access the terminal ...
1
vote
0answers
31 views

Unfamiliar text in powerline prompt after anaconda (python) installation [duplicate]

I have installed powerline on Ubuntu. I just installed anaconda for python, and I allowed the installer to make changes in my .bashrc file. The following lines were added in my .bashrc: # added by ...
0
votes
0answers
113 views

python script in rc.local won't start at boot

This is what I've put in rc.local: /usr/bin/python3 /home/lz/DynDnsUpdater/DynDnsUpdater.py &>> /home/lz/DynDnsUpdater/log & It's supposed to redirect every output to the log file and ...
-1
votes
0answers
112 views

Ubuntu 18.04 lts Composer+drush results in php warning

I installed composer globally, and then install drush globally as well. When I run drush status for the first time the command was not found, so I found a tutorial and it said I need to add some path ...
0
votes
1answer
98 views

calling ssh alias with sshc strange character appear on remote host

when calling via ssh alias a remote host, strange characters appear ^[[6;3~fhem@UB9:~$ ;3~ -bash: syntax error near unexpected token `;' in .bashrc ### add to .bash_aliases, for differentiating ...
3
votes
1answer
197 views

How to add /usr/bin to path after I mistakenly removed it (sudo and nano are no longer in path) [duplicate]

Lets get this out of the way, I did something stupid. Yes, stupid. Very stupid. I am well aware of how stupid this is. I am embarrassed and I regret doing it. Please help. I was installing a program, ...
0
votes
0answers
32 views

Blank terminal on ubuntu 18 [duplicate]

I tried to add an alias in the bash but I think I deleted something as I now can't see no user in my terminal.. I did vim ~/.bashrc Then e to edit the file and edited on the last line where I added ...
1
vote
0answers
105 views

Can't Configure Bash-Shell to Run OpenFOAM (working enviroment)

I've Been trying to download and install OpenFOAM-v1806 for windows 10 using Ubuntu. I am currently using this guide to help me https://www.openfoam.com/download/install-windows-10.php and am stuck at ...
1
vote
3answers
81 views

How do i make dir have colors for files/directories like ls does it?

Im running Ubuntu 18.04 and I'm very used to typing dir instead of ls as a habit. When i use ls, I get the directory contents listed with different colors for files and directories, as to be expected, ...
4
votes
1answer
111 views

when parent directory is mounted on to new volume, i cannot see the sub directory which was existing earlier

After mounting /yesh onto a new volume, I cannot see the sub directory /yesh/data001 which was existing before mounting. If the sub directory is existing where can I find it?
5
votes
1answer
591 views

Command history seems to be missing the first 75 lines

A couple of years ago, I did the automatic distribution update from 14.04 to 16.04. For the first time in my life, I was able to continue to use the computer after the automatic distribution update. ...
0
votes
0answers
148 views

How to create permanent env Varibales and PATH in .bash_profile

I am new in Ubuntu and generally Linux. Setting up React Native for development following official DOCsI faced a problem. when I define path variables in .bashrc on every logout/restart the PATH and ...
0
votes
0answers
72 views

ANDROID_HOME varibale changed to PWD

I want to setup Android SDK on Ubuntu 18.04.1 LTS for React Native programming. according to the official Docs I have to define paths in .bash_profile. at first I was just putting the export commands ...
0
votes
1answer
279 views

Is there an easier way to edit a text file in ubuntu? [duplicate]

I need to edit the etc/bash.bashrc file but the VI is being a little complicated. Is there a way to access the folder directly? Not by cmd, and edit by the text editor?
1
vote
2answers
51 views

Ubuntu 16.04: Inability to log in after small modification in .profile file in user home

I have an Ubuntu 16.04 system on my laptop. I had installed the program redshift on it which adjusts the screen light to make it easier on the eyes. Today in a bid to always start it up automatically ...
1
vote
0answers
22 views

Prevent alias with `find` from running at login

How do I make an alias in .bashrc with sub-commands? Right now I have: alias pngc="for file in \`find \$1 -name \"*.png\"\`; do pngcrush -brute \"\$file\" temp.png; mv -f temp.png \$file; done" If ...
1
vote
0answers
44 views

Changing the color of terminal text

I'm using Ubuntu 16.04 LTS I mean changing the color of text I type, not user@server. Have seen some other posts about it, but could not get it to work. Want it permanent. I already change the user@...
0
votes
1answer
62 views

New user, broken bash prompt parsing?

I created a new user. When I su into the new user, I get the following bash prompt: \[\e]0;\u@\h: \w\a\]\u@\h:\w$ For what it's worth, I created this user with the following Ansible task: user: ...
2
votes
1answer
63 views

How return from .bashrc if not run interactively?

I have two statements to return from ~/.bashrc if the shell is not interactive, probably from two Ubuntu versions, but I can't reconstruct which one is newer (and I assume thus better) and I'm ...
0
votes
0answers
43 views

How to find all instances where PATH is defined? [duplicate]

In my PATH variable I see duplicate paths that I have no idea how they ended up there. /home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/...
-3
votes
2answers
123 views

Systematically upgrading Ubuntu at login session

Right after my login session, I would like Ubuntu to execute sudo apt-get update & apt-get dist-upgrade , systematically / automatically. The terminal must be opened so that I can see the output ...
0
votes
0answers
175 views

Ubuntu terminal not getting launched

I was trying to change my ~/.bashrc file to make python3 the default. I abruptly closed the terminal. After that terminal is not launching if opened from accessories. I opened the terminal from my ...
0
votes
1answer
103 views

Get rid of name and hostname in a terminal prompt

I use powerline-shell and my prompt looks like: . How can I get rid of my name and hostname in the prompt? I tried to search in .bashrc file for PS1 variables: if [ "$color_prompt" = yes ]; then ...
1
vote
1answer
28 views

Command in .bash_profile returns outdated result [duplicate]

The .bash_profile file has the alias below. ~# cat .bash_profile # other commands alias btcblock="echo $(bitcoin-cli getblockcount 2>&1)/$(wget -O - http://blockchain.info/q/getblockcount 2>...
-3
votes
1answer
150 views

tar “no such file or directory” error during Scala installation

I followed these steps to download and install scala but faced some issues. Install Scala First download scala-2.12.1.tgz from the scala site Then run the following commands in the terminal sudo ...
0
votes
1answer
358 views

Updating environment variables

I had to erase a previous Ubuntu version on my pc, and reinstall a new version (16.04 LTS) to work. After that, I installed the source code of several programs that I work with in the previous version....
0
votes
1answer
25 views

Couldn't navigate through directories using bash script

Through script I am not able to change into directories and list the files. cd is not working. Here is my script #!/bin/bash export HOME=/home/yesh DIR_START=2 DIR_END=`wc -l < ${HOME}/conf/...
1
vote
0answers
174 views

“Network is unreachable” error for bash script at startup

I have a bash script that is run at startup on an Odroid running Ubuntu Mate. The script connects to the wifi and then calls a python script which makes a http request: ... nmcli dev connect ...
0
votes
0answers
60 views

Could alias python=python3 in my bashrc cause problems? [duplicate]

I would like to use python3 as my default python when working with the terminal. If I added the line alias python=python3 in my ~/.bashrc, could that cause problems with other programs?
10
votes
2answers
1k views

'~/.bashrc' vs ' /etc/skel/.bashrc'. Why are there two '.bashrcs'? [duplicate]

There are lots of questions about .bashrc. But I couldn't have found anything about this one: why are there two .bashrcs? ~/.bashrc and /etc/skel/.bashrc. When I compare them, I find no difference. ...
0
votes
0answers
100 views

Emacs launched from favorites doesn't read .bashrc

If I open emacs from the command line, it loads my .bashrc and correctly sets my paths. M-: (getenv "PATH") Returns my actual $PATH variable. If I open emacs from the command line, pin the icon to ...
1
vote
1answer
73 views

How to remove texlive from Path

I want to remove texlive from my PATH after deleting it with rm -rf command and I have deleted the path for texlive in .bashrc but when i run the command: echo $PATH I'm still seeing texlive in my ...
3
votes
2answers
985 views

script to show git branch in bash no longer works on ubuntu 18.04

In my 16.04 installation I put this in my ~/.bashrc file: #Show git branch in commandline parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1=...
9
votes
4answers
727 views

Bash: How to determine whether terminal is opened by third-party app

I want my bash script (specifically my ~/.bashrc) to do something only if the terminal was opened by me directly, and do something else if it was opened through an app e.g. VS Code. How can I ...
2
votes
2answers
177 views

Make a program ignore “.bashrc”

Sorry if it is an extremely stupid noob question, but I am not an expert and I cannot find any adequate response on this or other forums. I am running Ubuntu 18.04 x64 and I'm working with Intel ...
0
votes
0answers
15 views

How to save elements structure view in my terminal bash ? I dont like to have the full path! [duplicate]

I use this option to read what I need and use the screen space properly: export PS1='\[\033[0;35m\]\h\[\033[0;33m\] \W\[\033[00m\]: ' But sometimes is not saved I mean after login out and in again ...
2
votes
1answer
504 views

How can I set path so it can be read from GUI and command line by the same program?

I installed texlive and I want to add it as an environment variable to my Path so that Emacs AucTeX can read it when I start emacs from the GUI or from the command line. So far I've read that emacs ...
5
votes
2answers
340 views

Reverse-search in CLI: messed up output afterwards [duplicate]

See my edit below, this is not totally a duplicate of Shell prompt customization and cmd behavior My reverse-search function in the CLI is broken and I don't know how to fix it back... When I hit ...
3
votes
1answer
95 views

Install software that uses a different shell

I would like to install cryoSPARC, and looking through the readme it looks like this program requires that the user use bash as their default shell. At the moment I'm using tcsh, and have built up a ....