I've had some problems recently with terminal. The shell isn't able to execute basic commands, since they are not being found.  Here's an example :  -bash: ls: command not found  I've been doing some research and I suspect that it's the PATH, but I have no idea how to fix it or even look at it.  Any help would be much appreciated, I'm not the most knowledgable when it comes to this stuff, just fyi.
120771
I installed the most recent update to OS X Lion (10.7). After I did that, my terminal won't recognize normal commands. I typed ls and got:  -bash: ls: command not found   I figured I'd try to add usr/bin to my path, but I can't find .bash_profile to edit it since typing edit .bash_profile won't work. I can't set the Finder to show all files since my terminal won't recognize the commands necessary to do that.   what do I need to do?
114556
I'm brand new to Linux. I just installed Ubuntu as a dual boot system on my HP Pavilion laptop.  Where should I start? I've tried to play around with Terminal over the last hour or so, but I'm probably not helping myself out. Any suggestions are welcome!
1256
In my ~/.bashrc file reside two definitions:   commandA, which is an alias to a longer path commandB, which is an alias to a Bash script   I want to process the same file with these two commands, so I wrote the following Bash script:    #!/bin/bash  for file in "$@"     do     commandA $file     commandB $file done   Even after logging out of my session and logging back in, Bash prompts me with command not found errors for both commands when I run this script.  What am I doing wrong?
118654
In a bash sub shell I get the following error when running cd  sudo: cd: command not found   This is expected because I don't have a path. Usually to work around this I just provide the full path like so:  (/usr/local/bin/foo)  Much to my surprise, cd does not appear to be in any of the normal places.  which cd whereis cd ls /bin | grep cd   By comparison, ls is right where I would expect.   which ls /bin/ls   Where is the cd command located? And why is different from all the other commands?   Update  Another interesting tidbit, cd does not show up in hash  hash 0   /bin/ls 2   /usr/bin/find 2   /sbin/ip 1   /usr/bin/updatedb 1   /usr/bin/apt-get
7071
I changed the /etc/environment to add more directories to the PATH variable. But looks like $PATH in double quotes were not expanded and I could find any command from the shell and /usr/bin/command-not-found is run.  $ cat /etc/environment  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" PATH="$PATH:/home/user/technical/java/maven/bin" JAVA_HOME="/home/user/technical/java/jdk7"   so from the tty,  $ echo $PATH $PATH:/home/user/technical/java/maven/bin   why did not the expansion happen?
64463
So, when a command is not found, by what means is the "did you mean:" list populated? What program finds these alternate commands?  What is the meaning of: "(main), (universe)..."? Can I change which program finds these?
69416
I'm learning how to create shell scripts on UNIX for a college class. The textbook says I should just be able to type the filename in my terminal and it should run, but so far I haven't been able to get that to work. But it works fine when I type in ./myscript. Currently, I am typing the scripts out on my Mac terminal, but I had FreeBSD loaded onto a virtual box and it was doing the same thing to me.  I think maybe I need to change my environment path? I remember I had to do that when I started writing python files.
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
12192
By typing a manually specified command in terminal I want to execute some other command.  How could add an alias to a command? Can i do that with the help of the terminal or should I edit some kind of file?
84026
I am new to Linux and only know my way around because of the GUI.  Is there a way to see the equivalent commands on the terminal to do the same things as using the GUI?  Thanks
112793
I am writing a bash script to automate several actions:  #!/bin/bash           echo "Hello, World" NAME="${1}" PATH="${2}" echo $NAME echo $PATH eval "ls"   I am going to call ls, ffmpeg and a lot of other commands.  However running my script gives me the following error:  /var/www/html# ./life.sh test midhand.mp4 + ./life.sh test midhand.mp4 Hello, World test midhand.mp4 ./life.sh: line 9: ls: command not found   How come? why not found? Maybe I should import a directory with scripts?
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?!
26834
As far as I understand bash is the default shell in Ubuntu, so why does /bin/sh point to /bin/dash?
111306
I want to remove certain files using find and -exec. But unlikely bash tells me, that I'm "missing" some argument.   find . -name *.png -exec rm {} /;   what do I miss?  same "missing argument" return for my attempt to rename some files:  find . -name ic_launcher.png -exec mv {} other_name.png /;   Can somebody tell me, what bash does miss, and why this command isn't successful?
108138
I'm learning about Linux, started yesterday. I have a question which I couldn't answer from my book or Google. What is the difference between  ./ and / in the shell?  I'm asking this because when I run, for example, the command ./home/yogesh/Desktop/Books, I get this error:  bash: ./home/yogesh/Desktop : No such file or directory   However, on removing the dot it gives  /home/yogesh/Desktop/Books : Is a directory   Or, if I run /Desktop, it returns   /Desktop : No such file or directory   But on adding a dot before /, I get  ./Desktop: is a directory   What is the difference between ./ and /?
10067
I've just installed Ubuntu 18.04 and selected "minimal install". I then tried to run ifconfig in the terminal and got the following message  -bash: ifconfig: command not found   How come the  is not installed by default any more?
19263
I'm trying to to execute a script, which uses the command rename.   When I execute it, I get a message rename: command not found. Any ideas?   if [[ -z '$3' ]]; then     shopt -s dotglob     rename "$EXPRESSION" ./* else     rename "$EXPRESSION" "$3" fi