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.
Introduction to Linux
A Hands on Guide
The Bell Labs developers named their project "UNIX."
The code recycling features were very important. Until then, all commercially available computer systems
were written in a code specifically developed for one system. UNIX on the other hand needed only a small
piece of that special code, which is now commonly named the kernel. This kernel is the only piece of code
that needs to be adapted for every specific system and forms the base of the UNIX system. The operating
system and all other functions were built around this kernel and written in a higher programming language, C.
I believe linux kernel is written in the same language, but i am not sure as i am not a programmer. Most all of the information about Linux, what language it is in and related information, again, is in the tutorials.
here is some info (a simple hello world program) on how linux relates to asm:
(gee what a tool Google can be !!)
System calls in Linux are done through int 0x80. (actually there's a kernel patch allowing system calls to be done via the syscall (sysenter) instruction on newer CPUs, but this thing is still experimental).
Linux differs from the usual UNIX calling convention, and features a "fastcall" convention for system calls (it resembles DOS). The system function number is passed in eax, and arguments are passed through registers, not the stack. There can be up to six arguments in ebx, ecx, edx, esi, edi, ebp consequently. If there are more arguments, they are simply passed though the structure as first argument. The result is returned in eax, and the stack is not touched at all.
System call function numbers are in sys/syscall.h, but actually in asm/unistd.h. Documentation on the actual system calls is in section 2 of the manual pages some documentation is in the 2nd section of manual (for example to find info on write system call, issue the command man 2 write).
There have been several attempts to write an up-to-date documentation of the Linux system calls, examine URLs in the References section below.
So, our Linux program will look like:
global _start ;must be declared for linker (ld)
msg db 'Hello, world!',0xa ;our dear string
len equ $ - msg ;length of our dear string
_start: ;tell linker entry point
mov edx,len ;message length
mov ecx,msg ;message to write
mov ebx,1 ;file descriptor (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel
i have a link that i can't find right now, that showed a graphical representation of what i believe was an operating system. it showed the kernel, and modules, w/ conecting lines for associations. i wish i had that link at hand right now (help refresh my mind as well). perhaps that model enlarged, w/ commands that show the associations relevant to the kernel, and modules. i think this is something out of AT&T research laboratories (?? not certain)
thanks again. just realize that all that you've posted can take a couple of years to digest!
i think i need a search engine tied into my favorites/ bookmarks!
xoros, thanks for the system calls info. are the system calls in machine language, assembly, or something else?
you're also getting into cpu architecture i believe as well. so at the core it's 0's, and 1's, w/ zeros being off, and 1's being on (binary # system). 8 bits per byte, and something about a parity bit... switches that are on, or off, if this, then down the channel if not, then over to a different channel. processing data in a loop until all is processed. in a simplistic manner, writing a simple basic program w/ a computer course back in the 80's was to give the basic idea of how a computer functions.
I would also suggest that you learn Linux on a computer that is not important to your everyday life. I find the best way to learn is often by breaking things, and then fixing them. That makes the exact choice of a distro less important, as you could try out several - you learn something each time, and build up your own idea of which distro is best for you. As far as the basics go, they are all very similar, anyway.
Originally posted by Steve Cronje I would also suggest that you learn Linux on a computer that is not important to your everyday life. I find the best way to learn is often by breaking things, and then fixing them. That makes the exact choice of a distro less important, as you could try out several - you learn something each time, and build up your own idea of which distro is best for you. As far as the basics go, they are all very similar, anyway.
Just my 2c
i think that makes sense. i've seen others recommend an older box for learning linux on. it's also been recommended that a linux computer should have hardware that is 6-12 months old, as this will allow for most distros to work on it. no winmodems, avoid usb internet devices (use ethernet NIC's instead)...
Pocket Linux Guide
The guide is structured as a project that builds a small diskette-based GNU/Linux system called Pocket Linux. Each chapter explores a small piece of the overall system explaining how it works, why it is needed and how to build it. It is intended for Linux users who would like to gain a deeper
understanding about how their system works beneath the shroud of distribution specific features and tools. After completing the Pocket Linux project, readers should possess an enhanced knowledge of what makes GNU/Linux systems work as well as the confidence to explore larger, more complex source-code-only projects.
xoros, great links. the pocket linux guide does state that it's for intermediate to advanced users. it really looks like something that i was asking for though (something small- and a tutorial). i bookmarked both of your links. i'll need to get into more of the commands, recompiling, ect... before tackling it though (or gentoo, or lsf distros). what's appealing is that it's small, which means that there is enough there to learn w/o getting too complicated.
btw, a small knoppix/ debian distro called "damn small linux" is something that i've downloaded for grins (it was referenced to me at www.linuxiso.org by someone). uses blackbox as the gui- quite minimalistic:
it occurs to me that you have to have a linux pc up and running before you get really deeply in to linux.
try gentoo- great documentation,(which i downloaded,printed and spiral notebooked-i can read paper easier than online) and a slick system when you are done, or try, if you live in the U.S. redhat, and get a redhat
specific book . why redhat ? i havent found any specific titles for mandrake or suse, but there are lots of redhat specific books.
i used redhat 8 and "redhat 8.0 bible" by c. negus- this book covered both command line AND gui equivalent for just about all
admin functions in linux. i learned enough about command line
and how it specifically related to redhat to make the book purchase worthwhile. the command line stuff i did in redhat boosted my confidence and knowledge to go for a gentoo install.
i also bought a copy of "running linux" from o'reily press- pretty good general linux stuff.
i'm not trying to push specific distros or specific books, just pointing out that the combo of redhat and availability of good redhat books worked to get me a basic beginning with the cli.
just like there are many linux distros, there are many paths to learning linux.
i found redhat 8.0 to be somewhat lacking. for some reason, mandrake 9.0 seems to have a better layout. but the documentation of redhat as you say is much better, which carries some weight. one thing that impressed me, when i had redhat 8 installed, i registered, and got an updated kernel, and patches/ bug fixes. the updated, and previous kernels were each listed on the bootloader, so if either proved to be unstable, then a reboot, and switch would get you back in business. perhaps redhat 9 is better? i've had trouble downloading distros- time to get a download manager going.