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.
then i attempt to run the program, (by default named a.out)
[ruben@localhost ruben]$ a.out
bash: a.out: command not found
so i attempt to name it and run it
[ruben@localhost ruben]$ gcc helloworld.c -o world
[ruben@localhost ruben]$ world
bash: world: command not found
Can anyone help me out and let me know what im doing wrong? I'm running Red Hat 9 with an uncompiled kernel, freshly installed with all the programming aps installed. Any suggestions would help. Thanks!
[ruben@localhost ruben]$ chmod a+x ./a.out
chmod: failed to get attributes of `./a.out': No such file or directory
[ruben@localhost ruben]$ ./a.out
bash: ./a.out: No such file or directory
try './a.out' or './world'.(it is DOTSLASH)
this ./ is the present working directory,and so by giving this,you are mentioning the full path.if you want to run it by just mentioning a.out,then you will have to include the particular directory in your PATH.
chmod a+x <file>
markes that file as beeing an executable...
it's the safest way to start an executable thats not in your path by specifying the absolute path, since youre cl could get confused, saying you have just compiled a program thats named configure
when you now type configure your shell wouldnt know if it should run the executable located in your path (echo $PATH) or the one you compiled...
which could lead to serious damages....
thus, you specify the full path, if your in that directory, thats ./ for your current working directory (~/ would represent your home dir)