I'm using VMWare, and running debian and whenever I run a new terminal my commands like &quot;ls&quot; seem to be lost. I've tried the solutions listed here for instance:  When I do: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin  it works temporarily. When I do: cd ~ nano .bash_profile export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH  -- the file changes and the save reflects but when I open a new terminal the commands are forgotten again. Edit: rowen@debianRhys:~$ echo $PATH  /home/rowen/bin:PATH   source .bash_profile bash: dircolors: command not found
67224
I'm using Linux Mint. My login shell (cat /etc/passwd | grep myUserName) is bash.  After I start my graphical desktop environment and run a terminal emulator from it, I can see that .bash_profile is not sourced (environment vars that are exported in it are unset). But if I log in from a text console (ctrl+alt+F1) or manually run bash -l from the terminal emulator, .bash_profile works fine.  Am I wrong when I think that .bash_profile should be sourced when X starts and all export'ed vars should be available in the terminal, running from X?  P.S. Placing everything in .bashrc and sourcing it from .bash_profile is not good idea (): environment stuff should be sourced only once.
9099
I have no clue, but lately I've been having this problem. After running my workstation suddenly something destroys PATH and lots of stuff stops working. Initially, my path had MANY directories listed (I use Windows 7 as a development box) and after some time, I only had 3-4 directories listed in my path left.  I can't even open the System Properties dialog where I can see environment variables (because it uses shell variables to start it and it doesn't work). In short, I reboot every time.   Any ideas what might cause that problem? I didn't run anything new/unusual lately. Only VmWare (but I've been using it in the past and didn't have that problem back then).  I just checked, even %WINDIR% is not defined. WTF?!
105624
I fiddled with my $PATH and now it's not working correctly anymore. So I thought, well, just remove the last things I added. However, I can't seem to figure out how.  I added things like so  export MAGICK_HOME="/Library/ImageMagick-6.7.5/" export PATH="$MAGICK_HOME/bin:$PATH" export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/"   I do not have the files ~/.bash_login or ~/.profile or /etc/environment. I can't find the mentioned strings in /etc/path or /etc/bashrc. I don't know a command except export, that manipulates the $PATH.   How do I get rid of these strings? (And, if it's obvious to you, what did I mess up?)
47698
I just noted this on bash  4.3; exact version number is 4.3.42(1)-release (x86-redhat-linux-gnu).   $ .. $ ... $ .... $ .....   Why do the "command not found" is not prompted ?  $ ... $ echo $?  $ 127   I checked the $PATH and the alias nothing; The man is not helping neither. The bash run on Fedora Linux, but I think it is not related to the OS.   EDIT   I just noted this it the same for any dot starting command  .za .zaza ..za ..zaza
92926
I've been trying to find the difference between using the dir and ls commands in terminal. I know ls is the traditional UNIX method of viewing the files in a directory, and that dir is the windows command prompt equivalent, but both commands work in terminal.   If I type in dir, it displays the files and folders in the directory, and if I type ls, it does the same, except with content highlighting. Both commands accept options (i.e. ls -a and dir -a both return all files and folders and hidden files.   So does anyone know what the difference is and why both dir and ls are used?
45180
My question is related to another open . My  echo $PATH gives me an output which is like   /home/sahil/.rvm/gems/ruby-1.9.3-p125/bin:/home/sahil/.rvm/gems/ruby-1.9.3-p125@global/bin:/home/sahil/.rvm/rubies/ruby-1.9.3-p125/bin:/home/sahil/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/sahil/.rvm/bin{}:/home/android-sdks/{}:/home/android-sdks/platform-tools/{}:/home/android-sdks/tools/{}:/home/sahil/android-sdks/tools{}:/home/sahil/android-sdks/tools:/home/sahil/android-sdks/platform-tools/   But running   ifconfig    gives me an output like  Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative privileges associated with your user account. ifconfig: command not found   after running command like given in other question  export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"   it runs ifconfig but blocks other commands of ruby rails or rvm.  Seeking help how to resolve this. Also why this happens?
85076
Just as the title indicates my PATH variable resets after every reboot. I read that I have to edit my bashrc file's PATH variable, but I don't have anything there that suggests anything related to the PATH variable.
52065
I've been trying to install Android developer tools on Eclipse, and I followed the information in .  Like the video said, I added the following two lines of code to the .bashrc file:  export PATH=$(PATH):-/android-sdk/tools/ export PATH=$(PATH):-/android-sdk/platform-tools/   It seems, however, that this did not help me to install the Android files on Eclipse, as I am still having problems with that. What's more, it seems that I can't make any command in the terminal without getting a major error now! Every time I try to make a command in the terminal I get the following message:     The command could not be located because '/usr/bin' is not included in   the PATH environment variable.   Is there away to restore .bashrc to its default?
43116
I want to remove ~/bin from my PATH.  I set it up months ago when Linux (Ubuntu) was very new to me, but I don't know how I added it...    Nothing shows up when I search all the files listed below. Where else could it be being set?  It is being pre-pended after $HOME/.profile prefixes PATH with $HOME/bin      If it makes any difference, I get the same PATH from both the command-prompt and a running script.    #!/bin/bash {   echo "first dir of PATH is: '${PATH%%:*}'"   shopt -s nullglob   cat \     /etc/profile \     /etc/bash.bashrc \     /etc/profile.d/*.sh \     $HOME/.bashrc \     $HOME/.bash_aliases \     /etc/bash_completion \     $HOME/.bash_completion* \     $HOME/.profile \     $HOME/.profile_zap \     $HOME/.bash_profile* \     $HOME/.bash_login* \   | sed -rne '/~\/bin/p' }   Output is:  first dir of PATH is: '~/bin'
79887
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 appears:  Error found when loading /home/hfinger/.profile:    /home/hfinger/.profile: line 1: #: command not found   /home/hfinger/.bashrc: line 1: syntax error near unexpected token '(' /home/hfinger/.bashrc: line 1: '# ~/.bashrc: executed by bash(1) for non-login shells.'    As a result the session will not be configured correctly.   You should fix the problem as soon as feasible.     Trouble is, what is the problem? I have searched AskUbuntu but no-one appears to have experienced this exact problem. I don't think it is the upgrade because it had been running for about a month before this problem appeared.    I have never touched these two files because I am quite happy to let the system create and configure them. Also, I try to keep Ubuntu as vanilla as possible to avoid having to restore settings after upgrading to a new release. For what it is worth, here are the first lines of each of these files:    .profile, line 1: # ~/.profile: executed by the command interpreter for login shells.   .bashrc, line 1: # ~/.bashrc: executed by bash(1) for non-login shells.     How do I need to fix these files? What additional information should I provide so that someone more knowledgeable than I can solve this dopey problem?
64931
I have a user, say user1, which has modifications to its .bash_profile, one of them changing the PATH, e.g.: export PATH=/some/place:$PATH. This change works fine if I log on as user1 or do a su - user1.  But if I try to run a command via su as root, e.g.:  su -c test.sh oracle   (test contains echo $PATH)  It doesn't seem to have the modified PATH (or root's PATH, for that matter). I've also tried copying .bash_profile to .profile, to no avail.   Why is this happening?
74027
Doing "ls" gives me absolutely no response. No "command not found", no "permission denied", absolutely nothing. I'm really confused. Please help.  Info: Running Ubuntu Server 16.04.4 on a Digital Ocean VM, 1 GB, 1 vCPU.
103444
I've added the line   alias ll='ls -l'   to the /etc/bash.bashrc. After a restart, the alias ll from that file affects me, which I checked by commenting out the corresponding alias in my ~/.bashrc (and logging out and back in after that edit). However, it seems to not affect root, as when I type sudo ll, I get "no such command". Shouldn't the alias work in any situation if it's in the system-wide .bashrc?
82072
I want to add to my PATH so that my computer (Ubuntu) knows where to interpret the "R" command (for launching R). I need this so a Terminal or RStudio can find where I installed R.  I did all of the following, none of which permanently associates the command R with the directory of my R installation in ~/R/bin.   export PATH=$PATH:$HOME/R/bin      &lt;- This works within the Terminal session it was enacted in, but if I open up a second terminal, PATH goes back to what it was before I added $HOME/R/bin to it   The same "local Terminal only" behavior occurred when I added this line to two different files, based on recommendations on various websites:   sudo vim ~/.profile   export PATH=$PATH:$HOME/R/bin  sudo vim /etc/environment  export PATH=$PATH:$HOME/R/bin    Why won't R be recognized in new Terminal sessions?
94692
I have a script called jsl in /usr/local/bin. Running which jsl finds it there.  I want to temporarily use a different version, and when I echo $PATH I see that /usr/bin is earlier in the path. So I added a script called jsl in that folder and I've verified that it is executable and runs correctly when called with the full path.  However, which jsl still finds the first version, and jsl still runs it.  Why isn't my new jsl being found by which or executed by name?
59625
while reading about linux file searching I got the following...  To search for files using the * wildcard, replace the unknown string with *, e.g. if you remember only that the extension was .out, type ls *.out  and when I tried the following command on system(ubuntu 14.04 LTS) ..I got   anupam@JAZZ:~$ ls  *.bash*   ls: cannot access  *.bash* : No such file or directory  anupam@JAZZ:~$ ls  .bash*  .bash_history   .bash_logout  .bash_profile  .bashrc  anupam@JAZZ:~$   in the first case why it is showing No such directory ( *.bash* ) and in next case its showing the files ( .bash* )   I am new to this flavor, and according to my automata theory classes (*) means any combination of strings including epsilon(empty),,So why the results are different in both the cases....?
88572
Apps launched via Finder seem to not respect the PATH as set in .bash_profile.  So when I try to run code from an IDE (Intellij) I no longer have access to programs in /usr/local/bin, which is normally added to my path in the Terminal.  Apparently .MacOSX/environment.plist  to do this, but it no longer works in Lion.  How can I set the PATH for Finder-launched applications?