At the center of the OS is the kernel which provides an abstraction of the actual computing hardware and manages basic OS resources such as processes and files systems. From a user's perspective it is perhaps interesting that the kernel appears to be a big runtime library and if you have enough system privileges you can make calls to that library and make changes to the runtime behavior of the OS.
Under Linux it is the shell (such as bash and csh) that you most often interact with. The shell provides a commandline interpreter allowing you to interact with the OS and do things such as navigating file systems, creating files, and starting applications.
To get started you should log into your UbuntuBox as the appropriate user and follow this tutorial:
PLEASE NOTE: the tutorial uses a Unix system called Solaris, we are using a Linux system called Ubuntu. At the kernel level the systems are virtually identical but Solaris uses a shell called tcsh where Ubuntu uses bash. Also, Solaris uses a proprietary GUI where Ubuntu uses a public domain GUI called GNOME/LDX by default. From the tutorial perspective this means that the only difference is how you start a terminal application -- in Ubuntu you click on the terminal icon on the desktop.
The last thing we need to talk about is editing files in order to be ready to do some programming under Linux. In order to edit a file simply launch the text editor application by clicking on the appropriate icon on your desktop and then start typing and save the file where you want it or use the file->open menu point to locate the file you want to edit.
The leafpad editor works just you would expect it to work.
#include <stdio.h> void main() { printf("Hello World\n"); }Go ahead and save the program, say, as the file 'hello.c'. At this point we are ready to compile and link the file:
$ gcc hello.cThis creates an executable with the default name 'a.out' (don't ask!). You can now run the executable with:
$ ./a.outThe prefix './' is necessary to tell the shell to start the executable from the current location. Of course it is possible to create an executable with a more sensical name:
$ gcc -o hello hello.cHere the '-o' switch specifies the executable name 'hello'. We can now start this executable:
$ ./hello