0
votes
1answer
14 views

Changing .bashrc to allow a call to “android” from any directory

I can successfully do the following command in the directory listed kn@MrComp:~/.android_os/adt-bundle-linux/sdk/tools$ android list targets Available Android targets: ---------- id: 1 or ...
0
votes
1answer
25 views

How to edit displayed bash name [duplicate]

I've done some googling, and looking around this stack overflow, but this one seems to elude me. How might I reduce/edit the displayed bash name on the terminal prompt? I.E. This: ...
-1
votes
1answer
37 views

Environment Variables and .bashrc [closed]

I need Help in this: that is how to do this Edit the setting file of the user. In our case it should be in the root directory of the user and the name is .bashrc or .bash_profile 2.- Add the ...
0
votes
1answer
27 views

Throwing error message when opening terminal

I'm new on Ubuntu and ROS. I installed two different distro. (groovy and hydro). When I open the terminal I take this error. bash: /opt/ros/groovy/setup.bash: No such file or directory I remove ...
0
votes
2answers
51 views

unable to type commands in terminal

I was install mpi and I have given the path for it in the .bashrc and I closed my terminal and after some time again I opened terminal it's showing following error in the very first line followed by ...
1
vote
1answer
30 views

Cannot seem to get bash history along with others working

This is very similar to all the other questions out there but at the same time not. I am running Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-59-generic x86_64) to be precise. I successfully setup a new user ...
2
votes
1answer
45 views

bashrc shortcuts in Tmux

I have sets many shortcuts in .bashrc profile of local user, and they work properly. Currently on my 12.04 system but when ever I tried to used them in tmux, I always get the same response command not ...
7
votes
2answers
116 views

Why does Ubuntu's default ~/.profile source ~/.bashrc?

These are the contents of the stock ~/.profile that came with my 13.10 (commented lines removed): if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi ...
0
votes
1answer
145 views

nvcc not found, but only when using sudo

I can't get ANYTHING working on linux. I'm trying to compile CudaMiner. sudo make: ypt-jane.o `test -f 'scrypt-jane.cpp' || echo './'`scrypt-jane.cpp mv -f .deps/cudaminer-scrypt-jane.Tpo ...
0
votes
3answers
57 views

Copy current terminal prompt to clipboard

Is there a way to copy the currently written content of the bash prompt? Say I wrote: ping www.google.com so that the lines in terminal looks like: petr@sova:~$ ping www.google.com and didn't ...
1
vote
1answer
104 views

ADT Bundle .bashrc $PATH not working

I Installed the ADT bundle, worked fine the first go, even from a Gnome custom launcher. Didn't test ADB or FASTBOOT from CL, subsequently neither nor ADT is working. echo "$PATH" /usr/local/sbin: ...
0
votes
1answer
224 views

bash: /home/gaja/.bashrc: line 4: syntax error near unexpected token `('

When I open the Terminal I got the following the errors. bash: /home/gaja/.bashrccu: No such file or directory bash: /home/gaja/.bashrc: line 4: syntax error near unexpected token (' bash: ...
0
votes
2answers
106 views

Problems with sudo inside shell script

I want to make a shell script to run VI with sudo if I try to edit a file that I don't have write permissions and for that I created an alias alias vi=my_script.sh #!/bin/bash file=$1 ...
1
vote
0answers
45 views

Login errors in .bashrc in 13.04

I just upgraded to 13.04, and suddenly I get xsession errors in my .bashrc on login. There is nothing wrong with the .bashrc file--I can source it from a terminal login, and after I get into the ...
0
votes
0answers
45 views

help changing an environmental variable

I need a little help with this syntax. Do I use the quotes? Do I add these variables to .bashrc or bash? Are bash and .bashrc the same file? Where is the .bashrc file? What is the "." leading the ...
2
votes
1answer
258 views

“Can't open” an /opt file

This is my first post. I wanted to ask for any idea so to solve my problem. I am using Ubuntu 12.04 LTS, and my purpose is to use OpenFoam CFD software. I am trying to execute an script called Allrun ...
-2
votes
1answer
101 views

How to absalutely fully change terminal prompt to color

its mind bogglingly supprising how hard it is to TOTALLY change terminal prompt graphic featurs.... Like PS1 Or in my case color features.... I have edited /etc/bash.bashrc and ~/.bashrc and ...
1
vote
2answers
120 views

Merging Home Directories Breaks Readline/.bashrc

Over the last few days, I merged a home directory from a working install of 12.04 to an old home directory, I believe from an install of 10.04 (it was a bare driv) I got the new drive to load and ...
6
votes
3answers
1k views

What does “${debian_chroot:+($debian_chroot)}” do in my terminal prompt?

In my terminal prompt definition in my .bashrc file, among other things, I have this snippet of code: ${debian_chroot:+($debian_chroot)} What does this do, and do I need it?
0
votes
1answer
42 views

How do I automatically change to a specific folder on login for an account with no home folder?

Typically I would create a user account and in the home folder, place the cd command in the ~/.bashrc file. For system users, however, with on home folders, the /etc/bash.bashrc file is used instead ...
3
votes
1answer
174 views

Why default .bashrc is set to return immediately if not running interactively?

In Ubuntu default .bashrc there's this: # If not running interactively, don't do anything [ -z "$PS1" ] && return Does anyone know why that is there? Is there something in the bashrc that ...
-1
votes
1answer
133 views

How to install class bench using make all and bashrc [duplicate]

Class bench is program for Linux,Classbench duty is create packets and generate some rules which they call them filter set.In class bench there is three folder: trace_generator db_generator ...
3
votes
1answer
354 views

Bash aliases - how do I run a file in a different folder without losing my current location?

I have a nice little bash alias in my .bashrc folder that allows me to start Tomcat running without having to cd into the folder first, e.g. alias startTomcat="cd ~/apache-tomcat-7.0.34/bin/ ...
1
vote
1answer
241 views

Creating new user, inconsistent bash prompt

I've created a new user profile with: useradd kitty passwd kitty mkdir kitty chmod 0700 kitty chown -R kitty:kitty adduser kitty sudo #when I did it I initially didn't ...
0
votes
1answer
755 views

why is source command not being run in .bashrc

I have a source command which i have to manually run every time I open a new terminal. source /opt/ros/groovy/setup.bash Thus I added the command into the .bashrc file. However the does not seem to ...
0
votes
1answer
75 views

Display part of fortune in different color

I created a custom fortune file for my favourite tweets in the format tweet and then the @username in a new line. An Example is: "You've changed." "Yeah I know, I'm a Transformer." ...
1
vote
1answer
1k views

Commands not working after editing .bashrc file

I need to install a programming software called cuda for my academic purpose. Googling how to install it on my Ubuntu 10.04, I found these and I have done that. download the software cd ~/Downloads ...
0
votes
0answers
247 views

.bashrc is changed but there are no changes in the system

Bashrc file: alias edit_bash='gedit ~/.bashrc' export PS1="\u:\w:$ " After rebooting the command edit_bash doesn't work (not found) and the greeting is still the same as it was before. What's up ...
0
votes
1answer
2k views

How to reset .bashrc file which edited before to set PATH ANDROID sdk

bash: export: `/home/entw/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local /bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/bin': not a valid identifier bash: /home/entw/.bashrc: line 111: ...
13
votes
4answers
392 views

How to get shared bashed history among different tabs

I used the answer in http://unix.stackexchange.com/a/1292/41729 to enable real-time shared history among separate bash terminals. As explained in the answer above, this is achieved by adding: # avoid ...
10
votes
1answer
863 views

How do I show a message with username and date at login?

How to show the message "hello $username, today's date is $date" as soon as you login to Ubuntu.
0
votes
2answers
213 views

How to get original system command after overwriting it with a function?

I'm at a Hackathon right now so if someone would answer this soon, you'd be doing me a huge favor. I've written a function called ls() in my .bashrc that looks like this: ls() { if(some ...
3
votes
2answers
2k views

Changing behavior of bash prompt when functioning as root

Before you click away, this isn't the typical "how do I make my bash prompt have color" question. I've already customized my bash prompt to look like this: [user @ host]----[$(pwd)] $ where ...
0
votes
1answer
619 views

source .bashrc does nothing

after installing virtualenvwrapper I edited .bash_profile and added those lines (it was blank actually) export WORKON_HOME="$HOME/.virtualenvs" source /usr/local/bin/virtualenvwrapper.sh then I ...
1
vote
1answer
58 views

user recognizes command but root doesn't

I installed arm-linux-g++ and added its directory to PATH and it recognizes the command. But when I try it with sudo it says command not found. I even tried adding its directory to bashrc--root but ...
0
votes
0answers
20 views

How to use advanced history in terminal? [duplicate]

I used to have some option enabled which allowed me to for example type 'sudo a' in terminal and then arrow up would allow me to switch through all commands I entered before starting 'sudo a' for ...
0
votes
1answer
1k views

Bash alias not found stuck on my terminal

I was trying to make my Ubuntu connect to nexus tab and used the following command lines: echo "alias android-connect=\"mtpfs -o allow_other /media/GalaxyNexus\"" >> ~/.bashrc echo "alias ...
1
vote
1answer
128 views

Bash is printing (only) one of my aliases before every prompt

I think this is the relevant bit of my ~/.bashrc file: # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors ...
3
votes
1answer
208 views

Saw an interesting command but can't alias it

Saw an command from this post http://askubuntu.com/a/266839/75967 that I would like to alias find {,/usr}/{,s}bin -printf '%f\0' | xargs -0 whatis | sort | less I assume the less or the | is ...
3
votes
2answers
1k views

How can I shorten the bash prompt's current path to one letter per directory?

I can't remember where, but I've already seen the bash prompt's current path shortened in an interesting way: every directory contained in the path is replaced by its first letter only. For instance: ...
3
votes
1answer
3k views

How to save terminal history manually?

It's my understanding that the history file is updated when the terminal exits. But sometimes my computer crashes out, and the terminal doesn't exit cleanly, and then I lose those commands from my ...
24
votes
2answers
2k views

How to run a script every time internet connects

I often mount a remote drive using sshfs. I would love to have this mount automatically. However, if I mount it in my .bashrc or startup scripts, the mount often fails because my wireless internet ...
2
votes
1answer
712 views

bash history not being preserved

this is a fresh install of ubuntu 12.10. i haven't even looked at the bashrc or profile files when i noticed that history would work fine for the current session. as soon as i closed the terminal, ...
0
votes
1answer
404 views

What is the best way to add some configuration to bashrc?

I'm currently trying to configure a server using Precise Pangolin and Vagrant (a software allowing me to provision a number of software when booting my VM). My current question is a pure bash one. ...
1
vote
2answers
205 views

how to reverse the lower case characters in word using only sed

Reverse every word of a line using sed Description ----------- The job to do is reversing every word of a line. that a word is a sequence of lowercase alphabets Raw Input ...
0
votes
0answers
131 views

/etc/bash.bashrc executed but not ~/.bashrc [duplicate]

The bash man page says: "When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, " I can see that bash.bashrc is executed ...
2
votes
1answer
2k views

What can cause my .profile file to not be loaded when a new terminal shell is initialized?

There are no errors in xsession and I don't have a .bash_login or .bash_profile file, so I'm 100% certain neither of those is loaded and thus cancels .profile loading. When I rename the .profile to ...
4
votes
1answer
255 views

why aren't my bash aliases applied when logging in to server

When I log in to my Ubuntu 12.04 LTS server my bash aliases aren't applied, but if I execute bash from the command line they are. ~/.profile executes ~/.bashrc: if [ "$BASH" ]; then if [ -f ...
5
votes
1answer
266 views

My bash function runs only once per terminal opened

When I try to run my bash function, defined in .bashrc, for a second time in the same terminal, it doesn't work. The code is the following: function nos (){ local option while getopts cs ...
0
votes
2answers
685 views

Running gedit in background

So I've got this working in a 10.04 ubuntu OS in bash where I can run: $ gedit app/file.rb bash opens that file with gedit but it is tied up. How can I make my earlier command equivalent to $ ...