LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 06-23-2003, 07:33 PM   #16
xoros
Member
 
Registered: Jun 2003
Posts: 45

Rep: Reputation: 15

From:
Introduction to Linux
A Hands on Guide
Machtelt Garrels

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.

Last edited by xoros; 06-23-2003 at 07:36 PM.
 
Old 06-23-2003, 08:01 PM   #17
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Quote:
Originally posted by len
situation is, i need to learn some of the basic commands
I think it's more than just the
Linux bash commands (in my sig), it's learning how the filesystem is layed out,

# Linux filesystem structure
Directory Navigation Help File
Filesystems, Directories, and Devices Help File
Proper Filesystem Layout

and how linux actually works.

For in detail learning, download and/or buy the Rute User's Tutorial and Exposition and for a quick reference, download the Linux Newbie Administrator Guide.

Choose your distro:

# What distro should I use
A Beginner's Guide to Choosing a Linux Distribution

Prepare to install on your box:

GNU/Linux pre-installation checklist and/or your distros docs

Install it, work with it some, learn how to get good answers with your questions about Linux, and get to learning.

Here are some handy bash commands for finding out stuff in Linux:
# Find CPU specifications
cat /proc/cpuinfo

# What pci cards are installed and what irq/port is used
cat /proc/pci

# Memory and swap information
free
An article: Tips for Optimizing Linux Memory

# How is the hard drive partitioned
fdisk /dev/hd<X> -l

# How much free drive space
df -h

# Show disk usage by current directory and all subdirectories
du | less

# What takes up so much space on your box
# Run from the directory in question and the largest chunk shows up last
find $1 -type d | xargs du -sm | sort -g

# Find running kernel version
uname -r

# Find X server version
X -showconfig

# What compiler version do I have installed
gcc -v
gcc --version

# What is the distribution
cat /etc/.product
cat /etc/.issue
cat /etc/issue
cat /etc/issue.net
sysinfo

# For finding or locating files
find
locate
which
whereis

# Use dmesg to view the kernel ring buffer (error messages)
dmesg | less

# Watch error messages as they happen (sysklog needed)
as root, tail -f /var/log/messages (shows last 10 lines, use a number in front of f for more lines)

# What processes are running
ps -A

# Find a process by name
ps -ef | grep -i <plain text>
For example, XCDroast
ps -ef xcdroast

# See current environment list, or pipe to file
env | more
env > environmentvariablelist.txt

# Show current userid and assigned groups
id

# See all command aliases for the current user
alias

# See rpms installed on current system
rpmquery --all | more
rpmquery --all > <filename>
rpmquery --all | grep -i <plaintext>

# What directory am I using
pwd

# Get ls colors in less
ls --color=always | less -R

Look at man <command> or info <command> for the flags I used and for other options you can use for bash commands.
 
Old 06-23-2003, 08:26 PM   #18
xoros
Member
 
Registered: Jun 2003
Posts: 45

Rep: Reputation: 15
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:

section .text
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

Kernel source references:

*

arch/i386/kernel/entry.S
*

include/asm-i386/unistd.h
*

include/linux/sys.h
 
Old 06-23-2003, 08:38 PM   #19
xoros
Member
 
Registered: Jun 2003
Posts: 45

Rep: Reputation: 15
if these don't give you more of a "core grasp of linux" i don't know what else will.
http://www.luv.asn.au/overheads/prog/
http://www.tldp.org/LDP/lpg/index.html
http://www.newriders.com/books/opl/e...735710430.html
 
Old 06-23-2003, 08:46 PM   #20
len
Member
 
Registered: Jun 2003
Distribution: slackware 14
Posts: 143

Original Poster
Rep: Reputation: 15
fancypiper, that is another great reply.

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.
 
Old 06-23-2003, 08:47 PM   #21
len
Member
 
Registered: Jun 2003
Distribution: slackware 14
Posts: 143

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by xoros
if these don't give you more of a "core grasp of linux" i don't know what else will.
http://www.luv.asn.au/overheads/prog/
http://www.tldp.org/LDP/lpg/index.html
http://www.newriders.com/books/opl/e...735710430.html
jeese, choke it down my throat! well i asked for it
 
Old 06-23-2003, 08:49 PM   #22
len
Member
 
Registered: Jun 2003
Distribution: slackware 14
Posts: 143

Original Poster
Rep: Reputation: 15
Quote:
Unix (and computing in general) is littered with religious wars over languages, editors, methodologies, licences and paradigms. Some are worthwhile debates, others are meaningless flamewars.
from your link, xoros:

http://www.luv.asn.au/overheads/prog/biases.html

btw, all this info will take some major time to digest!

Last edited by len; 06-23-2003 at 08:51 PM.
 
Old 06-23-2003, 08:54 PM   #23
Steve Cronje
Member
 
Registered: Jan 2003
Location: Canada
Distribution: Ubuntu, Mepis, Debian
Posts: 158

Rep: Reputation: 31
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
HTH
Steve
 
Old 06-23-2003, 09:03 PM   #24
len
Member
 
Registered: Jun 2003
Distribution: slackware 14
Posts: 143

Original Poster
Rep: Reputation: 15
Quote:
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
HTH
Steve
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)...
 
Old 06-23-2003, 09:35 PM   #25
len
Member
 
Registered: Jun 2003
Distribution: slackware 14
Posts: 143

Original Poster
Rep: Reputation: 15
i'm finding this link to be informative:
http://www.tldp.org/LDP/lpg/index.html

i really do need some of the more rudimentary building block that this link is on top of though!

Last edited by len; 06-23-2003 at 09:36 PM.
 
Old 06-23-2003, 10:25 PM   #26
xoros
Member
 
Registered: Jun 2003
Posts: 45

Rep: Reputation: 15
maybe this might be a little more rudimentary

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.

http://www.tldp.org/LDP/Pocket-Linux...inux-Guide.pdf

Also the document titled "From Power Up To Bash Prompt" referenced in Pocket Guide Linux, i thought was very good explaining alot of things.
http://www.tldp.org/HOWTO/From-Power...OWTO.html#toc4

Last edited by xoros; 06-23-2003 at 10:46 PM.
 
Old 06-23-2003, 11:55 PM   #27
len
Member
 
Registered: Jun 2003
Distribution: slackware 14
Posts: 143

Original Poster
Rep: Reputation: 15
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:

http://www.damnsmalllinux.org/

Last edited by len; 06-23-2003 at 11:58 PM.
 
Old 06-30-2003, 11:14 AM   #28
luap
Member
 
Registered: Feb 2003
Location: atlanta ga usa
Distribution: suse 8.2
Posts: 78

Rep: Reputation: 15
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.
 
Old 06-30-2003, 01:19 PM   #29
len
Member
 
Registered: Jun 2003
Distribution: slackware 14
Posts: 143

Original Poster
Rep: Reputation: 15
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.
 
Old 06-30-2003, 10:06 PM   #30
len
Member
 
Registered: Jun 2003
Distribution: slackware 14
Posts: 143

Original Poster
Rep: Reputation: 15
found something on visualizing linux:
http://perso.wanadoo.fr/pascal.briss...3d/120-241.mpg

from this page:
http://perso.wanadoo.fr/pascal.briss.../kernel3d.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Teaching Linux for the beginners... tenzan Linux - General 4 09-16-2005 01:37 PM
Teaching Linux Guide needed rootking Linux - Software 3 07-02-2004 03:04 PM
Teaching Linux madunix Linux - Networking 4 05-12-2004 02:53 PM
teaching active directory w/o teaching network concept (possible???) Tafta General 4 01-21-2004 07:12 PM
Teaching Linux evilmrhenry Linux - General 5 11-14-2003 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration