Linux Basics Tutorial

About this tutorial

Yet Another Linux Basics tutorial...

* RedHat does it in four 8 hour days, the compressed version is one 8 hour day

* Novell does it in 5 hours

* This is the attempt to teach you THE BASICS in 2.5 hours without corporate bias

This is a BETA.

If this is too slow or fast let me know!

What is Linux?

A Fully-Functional Multi-User Multi-Process Unixlike Open Source Operating System comprised of Linus Torvalds' kernel, many GNU tools, and software from many many more contributers worldwide





Grabbing your distro...

distrowatch.com Boasts that there are 304 Linux distros in their database

Retailers like amazon.com will sell Linux distros still in the box and books that include a copy of the author's favorite distro

Once you've made a choice you can download the ISOs or install floppies from the distributor's website or a mirror

Don't have a cdrw? cheapbytes Can help you out.

Burning ISOs – Linux in 2 steps

1) cdrecord -scanbus

2) cdrecord -v speed=2 dev=0,0,0 -data cdimage.iso

Copying cdrom

1) Mount /mnt/cdrom

2) mkisofs -r -o cdimage.iso /mnt/cdrom

3) cdrecord -v speed=2 dev=0,0,0 -data cdimage.iso

More than you ever wanted to know about Linux cd

writing can be found at the howto...


Windows ISO burning


Shameless plug...

LUGs are another great way to get started with Linux.


Installfests, General Users Meetings, Tutorials such as this, Mailing Lists, and more!

Good commands that you need to memorize, today!

File Commands: ls, cd, cp, mv, rm, mkdir, rmdir

text reading: cat, more, less

text tools: awk, grep, sed

text editors: vi, emacs, pico, gedit

time: date, cal, uptime

Location: find, locate, which, whereis

file extraction: tar, unzip, gunzip

Processes: top, ps, lsof, kill, fg, bg

User tools: passwd, w, who, finger, talk

environment: printenv, setenv, echo

Internet: lynx, pine, whois

Service control: chkconfig, init.d, service

Printing: lpr, lpq

Networking: ifconfig, route, traceroute, dig, ping

disk usage: du, df, quota

partitions: fdisk, fsck, mkfs, tune2fs, mount

Tell me something about my computer

uname -a


cat /proc/cpuinfo


cat /proc/pci


Init allows you to control your system state

1 single user

2 multiuser

3 networking

4 reserved

5 X (aka the GUI)


Shutting down and Rebooting

/etc/shutdown -h now


/etc/shutdown -t60 -r


Output redirection

echo “this” > foo

echo “that” >> foo

cat foo



Pipes and More

The pipe |

cat /etc/passwd | grep

The semicolon ;

mkfs /dev/hdb1 ; mkfs /dev/hdb2

The slashdot ./


Shell Scripting

A series of commands in an executable text file


echo “Hello World”

echo “Print this to File” >> foo

lpr -Pmyprinter foo


It all starts with /























Files you never want to rm

*anything in /dev

*anything in /proc

*don't get tempted by /proc/kcore

*anything in /boot

*/lib/kernel/modules/{the kernel you want to use}

*contents of /etc, /bin, /usr/bin, /usr/lib

*you may remove the contents of /tmp but not /tmp

lilo.conf example
















Installing Packages

Debian Packages - dpkg

Red Hat Packages – rpm

rpm -Uvh package.rpm

rpm -ivh package.rpm

rpm -aq | grep package

rpm -e package

Tar files

To extract a tar.gz file: tar -zxvf {filename}

To extract a .tar file: tar -xvf foo.tar

To create a .tar file: tar -cvf /foodir foo.tar

once you've extracted the tar file look for a readme.

Perhaps there's an executable installation file

Or a Makefile

Perhaps it's source you need to compile yourself

File permissions

To check the permissions use “ls -l”

utilize groups

chown {username} {filename}

chown :{groupname} {filename}

chmod to change permissions

chmod a+rwx {filename}

chmod u+r {filename}

chmod o-x {filename}

chmod 700 {filename}

Start with a minimal configuration!

Don't install all the whistles and bells.

Only install what you need now.

Educate yourself about the services

you are running!

No one should use telnet or ftp, use ssh/scp instead

Use chkconfig –list

check http://www.cert.org for vulnerabilities

turn off any services that are vulnerabilities until you

can update or patch!

0 komentar:

In the News

Quote of the Day