Seems the understanding of absolute and relative paths in poor.
At any prompt, type "pwd" to see what the current directory is if you don't understand how to read the prompt provided.
I'll take a guess:
Code:
nathan@thinkpad-t440p:~$
There is a method to that prompt.
"nathan" is your current userid. Linux is a multi-user system, so there could be 60,000 different userids on a system. Chances are that a normal home Linux system will have less than 100. How many will depend on the number of programs installed and if those programs like to run under a different userid. Multi-user. Always remember that. My 20.04 desktop system has 54 userids, BTW. Also, usernames should always be lower-case and begin with an ASCII character, no numbers. There is probably a limit to how long a username can be. I just don't know it off the top of my head. For security reasons I want my real usename to be short, but random enough. "thefu482", for example. This is to prevent remote connections from being able to guess the login username. When I post here, I'll post with "thefu" as my username to simplify things.
"@thinkbap-t440p" says that the hostname is thinkbap-t440p.
":" is just a separator like the @, but those are placed in specific locations to make ssh, scp, rsync and some other programs easier to use by select/paste (We don't need copy/paste - select/paste is enough).
"~" is a shortcut for the current useids $HOME directory. echo $HOME will show the value. Every userid has a HOME.
And lastly, "$" says this userid is a normal user, not root. To show a root login, convention is to use the "#" prompt.
So, taken all together, nathan@thinkpad-t440p:~$ says
nathan on thinkpad-t440p in directory ~ Pretty slick.
What if the prompt where
nathan@thinkpad-t440p:/etc$
That tells use that the pwd is /etc/, but the user and hostname hasn't changed.
Let me grab a few prompts from my open terminals:
Code:
thefu@hadar:~/V/DONE$
thefu@regulus:~$
thefu@istar:/d/D1/M$
thefu@romulus:/tmp$
See how the information in each might be helpful?
Inside romulus:/tmp/ there was a file that I wanted in hadar:/tmp/ . I was on hadar, so I used scp to pull it over. Here was the command:
Code:
$ scp romulus:/tmp/blog44-2004.xml /tmp/
Because the usernames were the same on both systems, I didn't need to include them. Don't worry if this seems complex. The point is that those prompts have a specific reason for being the way they are, but we can completely customize them as much as we like. They are just environment variables - PS1, PS2, PS3, and PS4 are used by bash to setup the prompt in a terminal.
Does that begin to make a little more sense?
Moving on.
$ sudo mv '/usr/local/bin/TeensyduinoInstall.linux64' '/usr/bin'
Says to move a file from /usr/local/bin ---> /usr/bin/. That is probably a bad idea, since both of those directories are already in your PATH. Further, /usr/bin/ programs should come only from APT package installations, not from stuff we download off the internet. /usr/local/bin/ is a good location for that file, methinks. Why move it?
Code:
$ ./TeensyduinoInstall.linux64
says to run the program/script in the PWD. If you type pwd, does that program exist in that directory? I bet it doesn't, which why the error bash: ./TeensyduinoInstall.linux64: No such file or directory is shown. Try it without the ./ , see if that helps. If the program is:
a) in a directory in the PATH
and
b) has execute permissions for the current userid to have execute rights, then
the program will attempt to run.
The key thing to learn is to read the output from things that don't do what you want. Those error messages are usually clear, once you see them a few times.
No such file or directory says where ever you tried to run the program from, it isn't there. Figure out where it is, then run it from the correct location. It could be that the program isn't on the system. Usually, that would mean it isn't installed or it was incorrectly installed or it was installed to somewhere NOT in the PATH.
Bookmarks