Questions tagged [bashrc]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
38 views

bash /home/andyman/.bashrc :Permission denied

After doing chmod 600 ~/.ssh/id_rsa according to this answer, I cant access my home directory with cd and I get the above mentioned bash /home/andyman/.bashrc :Permission denied error every time I ...
1
vote
1answer
46 views

How to include configuration from other file in .bashrc and .bash_profile?

I often use use aliases in terminal. But alias command is only effective until I close that session. So, I have to set aliases and variables in .bashrc so they are permanent. But I when use TTY ...
1
vote
0answers
42 views

Bash is trying to run “_update_ps1” after every command, but only when in tmux

I have been working to change my statusline in bash from powerline-shell to the powerline bindings for bash. It appeared like it worked but when I opened tmux, after every command I get the error: ...
1
vote
0answers
25 views

After editing .bashrc, Ubuntu doesn't seem to be able to find some libraries/packages anymore. Any idea why? [duplicate]

Student coder here. I am trying to complete a project that asks me to install a package called "libncurses5-dev" and run a program through Ubuntu. It worked the first day, thankfully. However, on ...
0
votes
0answers
13 views

conda initialize error in .bashrc

bash: /home/user/.bashrc: line 125: syntax error near unexpected token `>' bash: /home/user/.bashrc: line 125: `>>>conda initialize>>>' I am continuously getting this error on ...
0
votes
1answer
82 views

Ubuntu 20.04 LTS : Whatever I am installing using pip3, it is giving a warning saying, add /home/username/.local/bin to path

I am asking this question because I was facing the same issue and could not find a complete solution so here it is. Steps to follow : 1. Open Files app, go to home. 2. Open .bashrc file using text ...
0
votes
0answers
29 views

.bashrc problem “Unexpected end of line” [duplicate]

I am facing a serious problem here, I tried adding some $PATHs in .bashrc then this problem rose up: bash: /home/ha1m1n/.bashrc: line 109: syntax error: unexpected end of file In here: # see /usr/...
0
votes
1answer
38 views

bashrc script outputs non-printing character

I added this bash script to my ./bashrc but a non-printing character appears in my terminal when the script runs, how can I fix it ? #!/bin/sh ## +-----------------------------------+-----------...
0
votes
0answers
69 views

“clear” command error: terminals database is inaccessible (Ubuntu 18.04)

After updating an Ubuntu 18.04 system using apt update and apt upgrade, running the command clear after connecting to the system via SSH results in the error terminals database is inaccessible How ...
0
votes
0answers
60 views

line 5: alias: python: not found [duplicate]

This is the problem I face when I boot my laptop. Error found when loading /home/pulkit/.profile /home/pulkit/.bashrc: line 5: alias: python: not found /home/pulkit/.bashrc: line 5: alias: =: not ...
2
votes
2answers
87 views

“syntax error: unexpected end of file” with ORIGINAL .bashrc

I'm at a loss here. Kubuntu 18.04.4 LTS Been running fine for a couple of years. All of a sudden I get "bash: .bashrc: line 118: syntax error: unexpected end of file" when opening a terminal window....
1
vote
0answers
21 views

Can't change Java version [duplicate]

I had Java 11, then decided to change to Java 8. I uninstalled 11 and installed 8. Then have added these lines into ~/.bashrc: export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64" export PATH=...
1
vote
1answer
74 views

Syntax error near unexpected token `then'

When I try to update (source .bashrc) my .bashrc in the Ubuntu terminal for changes in aliases, I get the error bash: ./.bashrc: line 34: syntax error near unexpected token `then' bash: ./.bashrc: ...
0
votes
1answer
56 views

Edit .bashrc file

As per suggestion given by the app developer in my mailDue to some inability of CPU, i am unable to run 'vmd' by direct command "vmd" in terminal. Instead i have to type 3 commands : /bin/sh: export ...
-1
votes
2answers
79 views

~/.bashrc not run when logging in as root

When I log in as root: ubuntu login: root Password: ...
1
vote
1answer
90 views

“Open in Terminal” from Nautilus not working

OS: Ubuntu 19.10. I use Nautilus as file manager, and I modified ~/.bashrc file to open the terminal in another directory rather than Home. Let's call the target directory $(MYDIR). Now, the problem ...
0
votes
1answer
103 views

arithmetic expression: expecting primary

I'm trying to add a function to the .bashrc file. The function is supposed to change any Application window's opacity according to the command line argument. opa(){ sh -c 'xprop -f ...
1
vote
1answer
34 views

Ubuntu 18.4: Cant access bashrc anymore

For the first time I accessed the bashrc file. I wanted to create alias shortcuts. I wasn't able to do anything and when I closed the terminal, I am not able to access it anymore. It gives me the ...
0
votes
1answer
75 views

WSL Ubuntu 18.04 : where is $PATH modified at startup?

In summary, there are entries in my $PATH that i don't know where they are added. Help! My general question is: At which places is my $PATH variable modified when starting up a terminal? My specific ...
0
votes
0answers
27 views

How can I display the time and date, from bashrc, when I open the terminal? [duplicate]

So I can display a message when open terminal. I modified the bashrc file and added something like: "Echo "Hello world!" " But I need to also add the date and time, but I don't know how. Can you ...
0
votes
0answers
16 views

How do i see time of all the commands typed when i execute “history” [duplicate]

when i type history then i only see no of command and the commands. but what can i write in .bashrc file so that when next time i execute history it shows me time of execution as well. I tried export ...
0
votes
1answer
47 views

How to solve SYNTAX ERROR

I was trying to install EGSnrc software and following the instruction from the web. But when I try to launch the installer ./EGSnrc-configure-linux this message showed up ./EGSnrc-configure-linux: ...
0
votes
1answer
143 views

Switch between different versions of a Program (R)

I have installed R couple years ago and yesterday I compiled a recent version from source. I now have version 3.4.4 installed, and it's launched with R. Accordingly, I have these command returning ...
1
vote
0answers
29 views

.bashrc seems not executed when logged in from a relay machine

I am using Xubuntu 18.04 in Virtualbox. I have 4 identically installed Xubuntu 18.04 virtual machines each doing different jobs. I have account A on machine One and account B on machine Two. In both ...
0
votes
1answer
36 views

Assigning a path as a variable in bash file

I am new in linux and I am trying to assign a path into a variable as follows #! /bin/bash path=/usr/local/driveworks/tools/capture cd path ./video_exporter ///media/uuresin/SSD3/last_record/...
4
votes
3answers
474 views

How to fix ~/.profile and ~/.bashrc syntax errors

Ubuntu 18.04.4 (automatic upgrade from 18.04.3 just a few weeks ago) /bin/bash After I log in from the Gnome shell, this message appears while the screen is just plain purple and before the desktop ...
2
votes
2answers
131 views

The same string twice in the $PATH environmental variable

When I run $PATH on my terminal in Ubuntu 18.04.3, it displays the following: /home/ubuntu/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/...
0
votes
1answer
59 views

How to automate terminal inputs/commands?

For example if I'm using gitlab and every time I do git pull/push etc. It shows this Username for 'https://gitlab.example.com': so every time this text is appeared in terminal it should automatically ...
0
votes
1answer
77 views

Note down the number of times the condition is true using bash/shell script

I was trying to write a shell script in unix environment and my requirement is if my condition is satisfied then it should note down how many times my condition is satisfied for example in below code ...
1
vote
1answer
39 views

syntax error: 'unexpected end of file

When I open a terminal, I get: bash: /root/.bashrc: line 115: syntax error: unexpected end of file bashrc has # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/...
1
vote
1answer
36 views

define vim key mapping for user defined bash function

I defined a bash function in my .bashrc file, "myfun" for example. Now I would like to execute this function inside vim function vimfun(filename) execute '!myfun' '%' endfunction and I want to ...
1
vote
1answer
211 views

bash: “command not found” when calling function defined in ~/.bashrc file in `bash -c` command while opening gnome-terminal tab

What I'm trying to do: Write a script to open 3 tabs. cd into a different folder in each tab (ie: run a unique command). get each tab to have a unique title I want this scripted so I can click ...
1
vote
1answer
57 views

source $HOME/.bashrc conflicts with zsh?

When I do source $HOME/.bashrc, it results in the following: As you can see, it jumbles up the text where the path of the current directory would be. I am calling this because I am trying to change ...
1
vote
0answers
120 views

'jupyter-notebook' command not working after installing Anaconda

After installing Anaconda and following the installation page, I have run into an issue that requires me to go to the bin in order to use the jupyter-notebook command. I found the this working with ...
1
vote
1answer
44 views

Vi/Vim editor enters next line instead of entering editor mode

Recently, I noticed that when I type vi foo.txt, my mouse cursor will simply enter the next line without actually opening the file. If it is a new file, I can enter Ctrl+C to enter the file and edit. ...
1
vote
4answers
96 views

BASH variables aren't loading properly on startup

I rarely post a question because I tend to get obsessed with trying to figure things out on my own, but today I am really stuck.... and I've had a long week and my brain is dead... anyways, I am ...
2
votes
2answers
1k views

bash: “Y”: command not found

I have installed some tools on my Ubuntu 18.04 and apparently something went wrong. There are a couple of phenomenons. The first is that Ctrl+Alt+t does not open a terminal. In order for me to open ...
0
votes
0answers
23 views

How to keep the Linux prompt unchanged on changing directory? [duplicate]

I don't want my prompt to grow as I change directory. It becomes pretty lengthy on ubuntu terminal and goes into multiple lines. Is there a way I change customize the PS1.
6
votes
4answers
360 views

Alias for all users

I created a this file: /etc/profile.d/pycharm_alias.sh startPyCharm() {... } alias py=startPyCharm I rebooted the PC, but then the alias is not available: ===> alias ...empty If I login to ...
3
votes
1answer
455 views

CLion doesn't pick up environment variables sourced in bashrc

Long Story (This is X) TLDR / The Problem (This is Y) Now, if running sh /opt/clion/bin/clion.sh from the Ubuntu terminal, CLion does pick up the environment variables sourced in the ~/.bashrc file, ...
1
vote
2answers
116 views

How to create shell script that wait till a program finished and after finished show me the msg that now your program is dead

In shell script how to create the script that wait and check a particular program running or not if running then wait till dead, after death of the program that script will show the msg that now your ...
1
vote
1answer
139 views

Can't append to PATH in ~./bashrc using $Home

I just want to add a path in ~/.bashrc as: export PATH="$Home/gg/gamit/bin:$Home/gg/kf/bin:$Home/gg/com:$PATH" But when I am using echo $PATH is showing it as: /gg/gamit/bin:/gg/kf/bin:/gg/com:/...
0
votes
1answer
23 views

How to pass std input while logging into remote server through script

While logging into my remote server it expects a user input, it's bash_profile is modified in such a way. [nikhil]$ cat .bash_profile if [ -f ~/.bashrc ]; then . ~/.bashrc fi read -p "enter ...
3
votes
2answers
3k views

How to make python shebang use python3?

I have a third party script that uses the shebang #!/usr/bin/env python. According to the python documentation, this is the correct form for scripts that are suitable for both Python v2 and Python v3 ...
3
votes
1answer
299 views

“~/.bashrc: Permission denied” when opening mate-terminal

When I open a terminal, with my Ubuntu 18 with mate desktop is mate-terminal (probably like gnome-terminal for mate desktop) appears this message -bash: /home/albert/.bashrc: Permission denied and ...
1
vote
1answer
308 views

syntax error near unexpected token `(' when adding svn branch to bash prompt

I'm trying to add SVN and git branch to bash prompt. The code I'm adding to bashrc is parse_git_branch () { git name-rev HEAD 2> /dev/null | sed ’s#HEAD\ (.*)# (git::\1)#‘ } parse_svn_branch() {...
0
votes
1answer
94 views

Syntax error in ~/.bashrc if statement

In my terminal, it says that my .bashrc file possess a syntax error. I could identify this bit of lines from my .bashrc that were incorrect but cannot fix it. This is the part of my .bashrc that ...
0
votes
0answers
39 views

Byobu terminal with function in bashrc

I am using byobu with tmux: byobu version 5.127 tmux 2.8 I have the following function defined in my .bashrc to monitor logs. function monitor_log() { IFS='\n'; watch -n 1 'tail -n 100 /...
2
votes
0answers
383 views

How can I install/emulate Swift on Ubuntu 19.04 for Android's Termux App

This is my very first question in this forum. Sorry for my bad english, please advise if it is not the right place to do it. I've tried to install Swift for Ubuntu 19.04 on Termux App for Android ...
0
votes
1answer
37 views

Can I access an a copy of bash profile current terminal is running right now?

I've mistakenly deleted the ~/.bashrc, but I have a running terminal with all the settings. Is it possible to access contents of ~/.bashrc as it was at the time of starting the terminal?

1
2 3 4 5
13