Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
My new Linux system sometimes does not recognize executables, and I'm not sure what to do.
For example, I am using fortran77, and just wrote a test "hello world" type program. I compiled it, and get an executable, "a.out" When I type "ln -l" for the file, it definately has executable priveledges. However, when I type "a.out" on the command line I get "command not found." This occurs no matter what I name the compiled program.
As a test, I tried compiling the exact same code in the exact same way on an established linux server. It works perfectly. There are other differences between this other system (hereafter called "the good system") and mine.
* on the good system, all exectuables are denoted by an asterisk (e.g. a.out*)
* on the good system, all directories are denoted by a slash (e.g. mydir/)
* on the good system, each file type shows up in a different color.
How can I get these cosmetic changes, too?
And, more importantly, do you have any ideas on why my little test executables aren't executing?
And to make the commands resided in the current working directory to be executed from the current working directory, edit your PATH environment variable to include current working directory, open /home/yourusername/.bash_profile file for editing and append at the end of PATH statement
:. ( it is a colon followed by a dot).
When you just type in the name (ie. hello) the shell will search your $PATH looking for the command 'hello' (to see exactly what it's searching, type 'echo $PATH'). Therefore you must explicitly tell it where it needs to look. In your case you would 'cd' into the directory which contains your file and type, './hello'.
if the shell doesn't find the prog when you're in the directory, that either means that your user's enviro variables weren't set very well, or that you're compiling and running this program as root.
for security reasons, root does not have the current directory in it's path, and it's a really bad idea to add it. this opens the door for trojans and other bad whatnots. it's not a serious issue on a desktop system at your home, but it's a good habit to learn to separate root work and regular user work.