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.
gcc is a compiler. You give it a list of files of source code written in C (typically), then it crunches on them for a bit, and finally spits out an executable file. gcc, by itself, will not do anything.
Are you trying to install some software? What is it you're trying to do?
No need to apologize. I've asked worse in my day, I guarantee it...
Well...... I don't know of many graphical environments like you'd see in the windows world. If you go to Freshmeat you might be able to find something.
gcc is the standard compiler for C code.
g++ is the compiler for C++ code.
So, assuming you had a source file named myprog.cpp, and wanted to test it, you'd issue a command similar to what you were suggested earlier:
g++ myprog.cpp -o my_program
That would create an executable named my_program provided there were no syntax errors or the like.
I believe vim and emacs (very popular editors) should have a way to "hook" into a c compiler. Both also have ways to colorize text based on syntax. I've never spent thte time to figure it all out though. They might do what you need, but for big programs, you'll need to read up on make and creating Makefiles.
Last edited by Dark_Helmet; 03-08-2003 at 09:40 PM.
It just so happens there's a thread in the programming forum where someone asked if there was a good editor with syntax highlighting for C and C++. Either one of the editors mentioned there will do the trick for you out-of-the-box or one of the folks reading the thread ought to be able to help customize the editor you choose. Anyway, here's the link:
Do you know what command line Ajunta used to compile the program? The reason I ask is this: g++ and gcc can output two different kinds of files. There are object files and executable files. Object files are sort of like middle-men; they aren't text source code but they aren't executables either. Look at Anjuta's options and see if you can find something along the lines of a "Compiler Command line" setting (or something similar) and post it here.
As for your problem with bash, that has something to do with your PATH environment variable. When you type a command, linux looks in a certain set of directories for the executable. Typically, the current directory is not included. So, to run a program in your current directory, you have to tell the shell explicitly. You do that by typing:
The "./" tells it to look in the current directory.
You can try that on your file and see if it runs. If it does, then you're good to go. If not, then it's an object file like I mentioned earlier.
Last edited by Dark_Helmet; 03-09-2003 at 01:19 AM.
It'll slow down... I did the same thing. I downloaded a bunch of distributions. Tried this, trashed that, installed another distro... repeat... repeat... you get the idea. Then you get to the point where things start making sense. Then everything is right with the world... until you discover LFS. Curiosity forces you to try, and it opens up a whole new set of challenges... interesting though...
Well to be perfectly honest I feel bad about posting this but anyway.
How can I start up with root access. I have all the passwords etc etc but I am trying to create a folder in /usr/home for mozilla, the default directory for install. It says I have to start up in root but I don't know how. I tried change root password to give me an oppotunity to type in the root password and now I have the little keys in the bottom right but I still can't make a new folder, anyone?
From a command line, type "su -". It will then ask you for a password. Specifically, it wants root's password. When you type it in, you'll be logged in as root. Then create the directories you need with mkdir. For instance: "mkdir /usr/home/mozilla" or whatever directories you need. When you're done, type "exit" at the command line. You'll then return to being a regular user.
I don't know of any way to gain root priviledges through the file manager windows without logging on as root. I would advise against that though. It's a good idea to be only when you absolutely must be. The su command lets you become root temporarily, reducing the risk of making a catastrophic mistake from a bad command.
Looks like I have to log in as root. This is because I type it in, create the directory and it all goes well. However the installer says when I try and install 'please choose somewhere else because you don't have permission'