Jump to content
Sign in to follow this  
Bruno

Tips for Linux Explorers

Recommended Posts

NOTE: Please be aware that the recent board software upgrade has corrupted the formatting on many threads/posts here on the board. This thread happens to be one of those that was affected. Please be patient with us here at Scot's while we manually repair each of these posts. You can always visit Bruno's Tips for Linux Explorers directly to read this same info that you see here in this thread. Thank you for your understanding.

 

~Eric, for the entire Staff at Scot's.

 

____________________________________________________________

 

 

General Linux tips can be a bit difficult to locate. In order to simplify where to look for the tips, I started this thread. I will add a new tip on a regular basis. Please keep in mind these tips are posted in random order, based upon questions posted on any given day. These do not provide full information, but just enough to make you hungry for more.

 

NOTE:

This site has exactly the same info but additionally an accurate search function through the Tips

 

The First Things To Know:

 

ISO's and md5sum

Checksum ISO's in Windows

Burning ISO's

Windows Tools: Burning ISOs

Windows Tools: Gparted

Md5sum of already burned CD's

Check CD Script

SHA-1 Checksums

Live CD's ( disto's that run from CD )

Basic rules for install

Change the BIOS settings

Making a boot floppy

Boot/Rescue CD

Formatting Floppy and Zip disks

The Tree Runaway Processes ( and how to kill them )

Skinny Elephants ( if all else fails )

Copy and paste

The "reset"-button

Updating your distro

Su and Root ( the difference )

Install cheatcodes

Lost user password

Lost Root password

Tricks in KDE home

The Linux Counter

Ultimate Boot CD

Backing-Up the MBR

Restoring the XP MBR

Removing Vista boot option

The Command "Info"

 

The Terminal/Console:

 

The Console/Terminal

VI and Emacs

Vi ( Revisited )

Bash

Bash history

Bash script

Tab completion

Ctrl+C ( Stop Processing Command )

Shorthand

File permissions

Changing file permissions

umask ( Advanced permissions )

Suid, Sticky and Chattr ( Advanced permissions )

The whatis command

Handy console commands

Hardlinks and symlinks

Again, handy file commands

Searching

The command less

A simple backup script

Redirections ( and the black hole: /dev/null )

Basic machine information

Hardware info commands

Getting in textmode and shutting down X

Aliases

The "links" browser f

stab and mtab

Mount and umount

Grep is for searching within a file

Global expressions

Regular expressions

The "PATH"

Splitting large files

Md5sum Trick

The Host Command

CDrecord

CDrecord and Kernel 2.6

Apropos

ImageMagick

Tweak the command "ls -l"

Transparent Console

The Find commad

Find and Replace with Sed

Diff and Cmp (Find the difference)

Diff, Find and Md5sum

DirDiff Script ( Diff the content of 2 directories )

Head and Tail

The Groups Command

Shred ( really delete )

Nice

Back- and Foreground Processes

The Command "File"

FTP on the Command Line

What Day was Yesterday ?

ldconfig ( Where are the Libs ? )

Easy Config File Backup

Make ISO from CD

The "at" Command

Kdesu and gksu

Counting words ( The "wc" command )

Change your Shell

The dd command

 

Installing Software:

 

Installing software RPM

Installing software TGZ

Installing software tarballs

Installing Software YUM for Fedora

Installing software URPMI

Installing software URPMI Part 2

URPMI Sources in Mandrake 9.2

URPMI Sources in Mandrake 10.0 Official

URPMI Sources in Mandrake 10.1 Official

URPMI Sources in Mandriva 2005 LE

URPMI Sources in Mandriva 2006

URPMI Sources in Mandriva 2007

Mandrake Club URPMI

Searching software in MCC ( Mandrake only )

Penguin Liberation Front Cheat-codes

Updating your urpmi-sources

Lost URPMI Distribution Sources

SRPMs ( Source RPMs )

RPM, Special tricks

Urpmq and urpmf

What is in that package ?

Installing Firefox in Linux

Version numbers

Re-install and upgrades

Corrupt RPM database

Searching software ( All distro's )

Ximian Red Carpet

TAR Unpacking Packages

Swaret ( For Slackware )

Apt-Get and Swaret on Dial-up

Installing a Kernel Source

 

File System:

 

Partitions Primary, Extended and Logical Partitions

File systems Partitioning Tools ( And which ones not to use )

Diskdrake Part 1

Diskdrake Part 2

Navigating the filesystem and simple commands

Mounting DOS/Windows partitions

Important config files and directories

Damaged Superblock

USB memory sticks and digital cameras

ISO to zip-drive

Press Y Within 5 Seconds

File System Commands

FSCK ( Filesystem check )

File System Check 2 ( fsck )

Auto fsck Fdisk ( fdisk )

Bad Blocks

Access Linux Partitions from Windows

MBR - Hard Disk Layout

 

 

Configuring Your System:

 

Cronjobs and the Cron-daemon

Cron and Anacron

User Related Cronjobs

The Lilo bootloader

Multiboot Lilo

Password ProtectLilo

Redo Lilo / Redo MBR ( PCLos )

Grub, The Bootloader

Multiboot Grub

Grub, booting runlevel 3

Configuring your networkcard

Config commands in RedHat ( and Fedora )

Dmesg debug messages

CPU Info

Configuring and compiling the kernel

Log files cleaning

Installing Macromedia Flash Plugin

Installing Java plugin

Runlevels

Sudo

Cups

Initscript Services ( chkconfig )

Changing Hostname

Changing Hostname in D*** Small Linux

Sharing Firefox and Thunderbird Config

 

Fine Tuning Your System:

 

Tweaking the prompt

Multimedia keys in Linux

Extra mouse buttons

Network status mii-diag

Ugly fonts in OpenOffice.org

Disable the OpenOffice.Org splash sreen

OpenOffice Quickstarter

Speed Up OpenOffice

Tweak Evolution

Tweaking Vi

Hdparm ( Harddisk performance )

3D acceleration test

Memory test

Configure XRunning

XFdrakeChroot

nVidia Drivers

LM-Sensors

Sensors in Gkrellm

Tweaking the Bootsplash

Swappiness

Extra Firefox Prefs

System Notifications Failure

Xlib Error

Tweaking MTU Settings

CD SpellcheckInit ( Startup Scripts )

No Capslock

Numlock in XFCE, IceWM and Fluxbox

Numlock in Text-Mode

ScreenShot Script

 

Security:

 

Services Started at Boot

Servers and Services

Rootkit Checkers

AV Software, and why you don't need it

F-Prot AV scanner for Linux

Browsers & Privacy

Mandriva Security Settings ( MSEC )

 

Hardware:

 

Modems and Linux

Fast Ethernet cards ( NIC's )

Conexant dial-in PCI modem in RedHat

Hardware Databases Win-Drivers for Wlan Cards

Problematic Canon Printers

 

Wireless Networking:

 

WiFi Support ( Mandrake and PCLos )

NDISwrapper

Configuring NDISwrapper in the Control Center

Configuring Wireless USB Finding a WiFi Card ( Linux Compatible )

 

Distro Specific:

 

Slackware Tips 1

Slackware Tips 2

Slackware Tips 3

Slackware Tips 4

Slackware Tips 5

D*** Small Linux HD install

D*** Small Linux: MyDSL

D*** Small Linux from USB, Saving Personal Files

D*** Small Linux from USB, Saving MyDSL Extensions

Installing RedHat ( first time )

Fedora Core 6 Install

Knoppix cheat-codes

More Knoppix cheatcodes

Ubuntu Rescue Mode

Extra fonts in Mandrake

Mandrake Update CD

Store and Sync Mandriva

Updates Locally

Local Mail in Mandriva

Mandrake 9.2 Install

Mandrake 10.0 OfficialInstall

Mandrake 10.1 Official Install

Mandriva 2005 LE Install

Mandriva 2006 Install

Mandriva 2007 Install

Alternative Mandriva Install

Running XFdrake

PCLos 5 Tips

PCLos Tweaks ( Preview 5 and 7 )

PCLos 8 tips

PCLos 9 tips

PCLos 92 Performance Tweaks

Redo Lilo / Redo MBR ( PCLos )

 

General Info:

 

Start New Session

A ( tiny ) keyboad tip

Gkrellm, mailcheck and sound

Gkrellm weather applet

Keyboard shortcuts

Commandline mp3 player

Shoutcast-Stream to MP3

Backup your Windows in Linux

Navigating windows partitions

Linux User Groups ( LUGs )

CD ripping with konqueror

Screen savers in KDE

Index.dat ( the secret Windows files )

Backup mail Evolution

RSS feeds, Linux related

Printing Man Pages

Atomic Clock

Rsync

Printing The Tips

Hidden Messages

VoIP with Kphone

SoundCheck Script

Spamassassin Tweaks

Booting in Runlevel 3 ( Trick with Lilo )

Looping an ISO

Automatic Time Syncing

Printing Web Pages as .txt

Great Linux Links

 

B) Bruno

Share this post


Link to post
Share on other sites

RUN-AWAY PROCESSES

( and the way to kill them )

 

A full system crash is very rare in Linux, most of the times it is only one program that acts up. There are several ways to recover from a crashed program.

 

1). If a program blocks, crashes or runs-away ( does not want to close or stop running ), change desktop and press the Ctrl+Esc keys. You will get the Process Table with all processes running on your system ( some processes may appear several times, that is normal ) the first four columns are the most important, if you know the name of the process things are simple, if you don't: in the 3rd and 4th you can see what is consuming all that cpu. Now remember or note down the PID number ( Process IDentifier ) you will need this. ( for multiple processes with the same name only the last one is the one you're after ).

Now go to yet another desktop open a terminal/console type < su > ( without the <> ) and give your root password, then type < kill 4246 >; ( if 4246 was the pid number ).

That's all, job done ! ( rebooting like in Windows is NOT needed in Linux !)

 

(There are other ways with names instead of numbers, terminal instead of gui process table, but this is the most general way to save your butt )

 

2). If all your desktops are blocked ( when X crashes): Press Ctrl+Alt+F1, you will go out of X, and get an empty terminal screen, fully black with a login prompt. ( there are 6 terminals available F1 to F6 ) Then log in as "root" ( not "su" this time ) and type <top>, you will get the same process-table with the PID numbers, find the number that's hurting, close top with the"Q" key, press Alt+F2, you will get a second black screen ( terminal ) to log in to, log in as root and < kill 4246 >.

For returning to X, press Alt+F7 !

 

3). Also you can try Ctrl+Alt+Backspace . . . it will log you out of X and bring you back to the graphical login screen where you can start KDE or Gnome again.

 

4). If even this does not help or you can not find the process and PID number just type "reboot" at the root-prompt ( of a Ctrl+Alt+F1 terminal ) and you will get a clean reboot.

 

5). If even this last step does not work, read the next Tip here below: "If all else fails"

 

B) Bruno

Share this post


Link to post
Share on other sites

SKINNY ELEPHANTS( Or: If All Else Fails )

 

In addition to the PID story in Runaway Processes If all is blocked and even Ctrl+Alt+backspace ( what should be a last resort ) does not react, if your system does not react on any action ( like I said before, very rare in Linux ) remember the next line:

 

Raising Skinny Elephants Is Utterly Boring

 

Here is how you "raise the elephant":

 

Alt+SysRq+r ( SysRq is on the same button as print screen ) ( The LEFT Alt key )

Alt+SysRq+s

Alt+SysRq+e

Alt+SysRq+i

Alt+SysRq+u

Alt+SysRq+b

 

Give a little time between keystrokes.

 

The r stands for put keyboard in raw mode

The s for sync the disk

The e for terminate all processes

The i for kill all processes

The u for remount all filesystems read only

The b for reboot the system

 

THIS IS THE VERY LAST SAVE YOUR BUTT PROCEDURE ! ONLY IF ALL ELSE FAILS !

 

B) Bruno

 

PS: If your filesystem is Ext3 or ReiserFS and on reboot it wants you to do a filesystem check, don't touch any key as it asks you to press "Y" and let it recover the journal automatically.

 

NOTE: For the skinny elephants to work you need to have the sysrq-key enabled in the kernel. (CONFIG_MAGIC_SYSRQ)

You can check if it is enabled by typing 'ls /proc/sys/kernel/sysrq' if it's there, it's enabled.

 

Thanks to Mischa for pointing this out.

Share this post


Link to post
Share on other sites

COPY AND PASTE

 

Here is a simple one: Copy and paste from one program to another program, ( your browser to a text editor, from one desktop to another, from a text editor to the console/terminal etc.etc. )

Just select the text with your mouse ( this copies it automatically to the clipboard ) go to the other screen and push the wheel ( or middle button ) that pastes it.

So only two movements . . no context menu . . just select and paste.

 

The only exception is OpenOffice, there you will have to do in like you do it in Windows: select, rightclick, choose copy from the contextmenu, rightclick and paste it from the context menu.

 

Sure the keyboard shortcuts Ctrl+c and Ctrl+v work in Linux too :)

 

In most distro's you will find a clipboard next to the clock ( an orange icon with a K ) . . . it remembers the last 5 entries ( or more if you configure it that way ) . . . simply tick the entry you want to paste and pushing the wheel will paste that entry where you want it.

 

If you want to copy a full config file to a textfile that you can send as a mail-attachment, one command will do: ( example the lilo.conf file )

 

# cat /etc/lilo.conf >lilo.txt

 

This will put a text file in your /home directory by the name of lilo.txt

 

B) Bruno

Edited by securitybreach

Share this post


Link to post
Share on other sites

CRON and ANACRON

 

If you run Mandrake, SUSE or many other distro's ( RedHat has anacron installed as default ) and your computer is not ON 24 hrs a day, there are several cron-jobs ( maintenance ) that might be forgotten because they are planned for 3 - 4 o'clock at night.Installing anacron will set this straight, anacron picks up forgotten cron-jobs and executes them 5 minutes after you boot your computer. You will notice extra activity of your CPU and harddisk for about 5 to 7 minutes !

 

Typical cron-jobs are updatedb updating the locate database and various other databases.

 

Logrotate that zips up old logfiles, var/log/syslog and var/log/messages might grow so big that in extreme cases you could run out of diskspace : resulting in having to reinstall the OS !

 

Installing anacron is simple and needs no configuring.

 

Mandrake Control Center --> Software Management --> Installing Software --> search for anacron.

 

:unsure: Bruno

Edited by LilBambi

Share this post


Link to post
Share on other sites

A FEW HANDY ( CONSOLE ) COMMANDS:

 

( $ and # make part of the prompt, $ is normal user, # is root )

 

For your network/internet connection: ( as root ! )

$ su ( to log in as root )< root password >

 

IP addresses and traffic:

# ifconfig
# route

 

Display disk performance:

# hdparm -t /dev/hda

 

Space usage:

$ df -h
$ du -s /var/log/*

( Space usage of all the files in /var/log )

 

Memory:

$ free -b ( In bites );'
$ free -k ( KB )
$ free -m ( MB )
$ free -o ( Without buffers )
$ free -t ( Totals )

 

Screenshot:

$ import -w root sreen.jpg

(Will store it in your home dir. )

 

See also "The One Page Linux Manual" in my sig.

 

B) Bruno

Share this post


Link to post
Share on other sites

Bruno, what a great idea. :) I only wish I could contribute something that hasn't been shared before. Oh well, in time; keep 'em coming. :D

Share this post


Link to post
Share on other sites

Thanks Quint ! :D

 

But that's it for today, tomorrow we will cover:

-The vi texteditor

-Configuring multi media keys under linux ( those extra buttons on fancy keyboards )

-Tweaking your prompt

 

:) Bruno

Share this post


Link to post
Share on other sites

This is great idea Bruno.It is really handy to have this stuff on one place when you need it.Good job, keep up!

Share this post


Link to post
Share on other sites
:D When I first tried to join a local Linux User Group I was told to "read all the books and howtos and don't ask stupid questions and waste everybody's time". Needless to say I took their advice but didn't join their group.Joy

Share this post


Link to post
Share on other sites

Thanks for your encouraging words, that's a real energy boost !

 

A little note on the site:

it's not my aim to turn you into full blown Linux geeks, but only to hand you the basics, the bare minimum in order to give you the appetite to learn more about Linux.Moderators, please make adjustments and corrections without hesitation, English is not my native language and I'm far from being a Linux guru.

 

I would never have started this thread without the backup of knowledgeable moderators as you are.

 

:) Bruno

Share this post


Link to post
Share on other sites

THE CONSOLE / TERMINAL

 

All the tasks we do on the commandline are done in a "dos-window", in Linux we call it a "Shell", "Console" or "Terminal" ( the name depends on the distro you use, Terminal is used in RedHat, Console in Mandrake ).

As you start up a Console ( look in your menu ) you will be presented with a “prompt“, this prompt will end with a $, this means that you are logged in as a normal user.

 

Once you type < su > and give your root password the $ will change in a #, indicating that you are root.

Ctrl+d will log you out as root and bring you back to $, if you do a Ctrl+d again the console will close.

 

( A normal prompt will look like: [localhost@localdomain:~]$ Not very spectacular, but in a few days we will start tweaking your prompt into something fancy, but the $ and # will always stay the same )

 

For nearly every program or command there are “man”-ual pages stored on your computer. You can read them by typing < man man >, this will give you the man pages for the command man. < man cp > will give you the man pages for the command cp. The spacebar lets you scroll the page. With < q > you close the man pages !

 

More info than the man pages can often be found by typing < --help > after the command. See < cp --help > gives a different result then < man cp >.

 

B) Bruno

Share this post


Link to post
Share on other sites

VI AND EMACS

 

All configuration files in Linux are written in plain English, easy to read and to adapt. We use a text-editor to write or make changes to those files.

The two most popular, powerful and "difficult" editors that you will find in every distro are Vi and Emacs. They both have "syntax-highlighting" to make writing code easy.

 

NOTE: Vi and Emacs fans fight bitter religious wars over which is better :)

( I prefer Vi :) )

 

Vi

 

There are hundreds of commands for Vi, we will only touch the absolute minimum.

$ vi tessst

 

Will open the file tessst in located in your /home, if the file does not exist it will create one.

Vi has 3 modes: a command mode, an insert mode and an ex mode.

When you start Vi it starts in command mode. So we first have to type an < i > to put it in insert mode. Now you can type "the quick brown fox etc."

After inserting the text we go back to command mode < Esc > and save the file with ZZ. Thats all we have to know for the beginning.: < i > for insert < Esc > for command, ZZ for saving the file.

 

Some more commands for Vi: ( less important )

i = insert text before the cursor

a = insert text after the cursor

: = switch to ex mode

$ = go to last place on the line

^ = go to first place on the line

w = next word

b = previous word

G = last line of the file

20G = go to line no 20

y = copy ( y3w = copy 3 words ) ( y3j = copy 4 lines )

p = paste

d = cut

x = delete character under the cursor

 

Emacs

 

Emacs is made easy because these days it has a GUI in modern distro's, but we will use the keyboard because it has more speed.

$ emacs ssset

 

Will open or create the file ssset in your /home

OK type away: " the quick brown etc".

Now to save the file do: Ctrl+x, Ctrl+c, y

Well i said we were going to keep it simple !

 

Leave the tessst and ssst files in your /home, in the next section we can do some exercises with them.

 

B) Bruno

Share this post


Link to post
Share on other sites

NAVIGATING THE FILESYSTEM AND SIMPLE COMMANDS

( only for the very fresh starters with Linux )

 

As we are doing the bare minimum these are the most often used commands:

cd = change directory

mkdir = make directory

rmdir = remove directory

rm = remove file

cp = copy

mv = move or rename

ls = lists directories and files

cat = show contents file

 

O.K. let's play:

 

Open an console on desktop 1, open the home directory by clicking on it on desktop 2 ( there you can see and verify the commands executed on desktop 1 )

 

$ mkdir One  ( without the $ ) ( makes a dir One in your home dir )
$ mkdir one  ( Linux is case sensitive so One and one are not the same ! ) ( makes a dir one in your home dir)
$ cp tessst One  ( copies the file tessst, that we made in previous Tip, to dir One )
$ mv ssset one  ( moves the file ssset, that we made in previous Tip, to dir one )
$ mv one One   ( moves dir one in dir One )
$ cd One   ( see how the promt puts the current dir in in the prompt ) ( puts you in dir One )
$ ls  ( shows you what is inside One )
$ cat tessst  ( shows contents file tessst )
$ rm tessst  ( removes file tessst from One dir )
$ cd ..  ( puts you back in your home dir
$ rm tessst  ( removes tessst from home dir )
$ rm -rf One  ( now all files and directories we played with are removed )

 

We have a look in the filesystem:

$ cd  /
$ ls

 

This shows you the directories in "/" (root filesystem): /boot, /etc, /initrd, /lost+found, /opt, /root, /tmp, /var, /bin, /dev, /home, /lib, /mnt, /proc, /sbin, /usr.

 

$ cd /mnt $ ls

 

This shows you the mounted devices, cdrom, cdrom2, floppy, (win_c)

 

$ cd  ( Brings you back to your /home )
$ ls  ( What is in your home )
$ ls -a  ( What is really in your home !!  The argument "-a" shows the hidden files. Hidden files start with "." )
$ vi .tessst  ( Makes an hidden file called .tessst in /home )
$ls  ( You don't see .tessst )
$ ls -a  ( You do see .tessst )
$ rm .tessst  ( Removes the hidden file .tessst )
$ ls -al  ( Shows you all the files in /home with their "permissions" more about that later. )

 

To know more about these commands and the arguments you can give them, see: "man cd" "man cp" "man mv" etc. etc.

 

B) Bruno

Share this post


Link to post
Share on other sites
:rolleyes: How about some basic stuff for real beginners? When I first started I couldn't work out how to get the CD to work, find out where to configure the sound, how to install stuff, where did it go when it was installed etc. That's the sort of thing that puts a lot of people off Linux, they're not all like us, willing to learn, they want it to work straight away.Joy

Share this post


Link to post
Share on other sites

Greengeek all that stuff is comming:

This is what I had in mind for the next week or so:Text editors Vi and EmacsNavigating the filesystem and basic commandsHidden files(Auto)Start programs at startupLocate, search filesInstall software with urpmi, rpm and tarballConfiguring Multi Media keysTweaking the promptIso burning and checksumFile permissions
I will add configuring sound to the list !More items can be added for the following week too <_< :rolleyes: Bruno

Share this post


Link to post
Share on other sites

back to runaway X Windows (KDE, etc.) program(works particularly well for Mandrake and RedHat RPM based systems):In KDE, click the K Button, select Run command, type "xkill" (sans quotes), your cursor turns into a funny square, click the program that is in runaway mode and bye bye program.If that fails, do "ALT, CTRL, F1" and then CTRL C to break out of XWindows (KDE, etc.). Then you can go back into X (KDE, etc.) ... problem has usually solved itself by exiting X. No need to reboot. :rolleyes:

Share this post


Link to post
Share on other sites
:rolleyes: How about some basic stuff for real beginners?  When I first started I couldn't work out how to get the CD to work, find out where to configure the sound, how to install stuff, where did it go when it was installed etc. That's the sort of thing that puts a lot of people off Linux, they're not all like us, willing to learn, they want it to work straight away.Joy
Joy,With the newer distributions (2.4.x kernel) a lot of this has become very automatic, almost plug'n'play. For instance, Red Hat and Mandrake now automounts your CDs if put it in while you're in X Windows. (If you are in the console uses this command: mount /dev/cdrom /mnt/cdrom and the contents of the CD are accessible from the filesystem directory /mnt/cdrom.)If you aren't familiar with the way Linux handles storage devices here's a concise explanation: You know that in DOS and Windows you access storage devices by drive letters such as a: for the floppy drive, c: for your active primary partition and letters for all other partitions, optical drives, USB keys, etc. In Linux you access storage devices by mounting the device so that it appears as if it's part of the directory structure, or as it is technically called, the filesystem. The Linux directory /dev is a special type of directory known as a block device. The /dev naming convention is used to identify the storage device and it is this device that you mount to a directory. Most Linux users stick with the default convention of mounting storage devices under the /mnt directory.

Share this post


Link to post
Share on other sites
:D Thanks Peachy, but I'm quite comfortable with the Penguin, I was thinking more of the absolute beginner who would probably have a minor heart attack if a Linux distro suddenly dropped him back at the command line.Joy

Share this post


Link to post
Share on other sites

Thanks Lilbambi & Peachy for joining in ! Need all the help to make this thread to a succesfull resource for Linux starters. :D Bruno

Share this post


Link to post
Share on other sites

Hi, all. Is a "runaway" in Linux the same as a "freeze" in Windows? :D

Share this post


Link to post
Share on other sites

Quint:Well, eh, kind of ! However very rare, ( extremely seldom compared to windows ) there are system freezes. Program crashes are more common du of bugs ( bugfixes ). Processes that run wild in a loop and keep consuming cpu, mostly because you made a mistake yourself. All those I call "runaway". The first bue screen o.d. has not been seen up till now on a Linux system. ( if you would see one, make a screenshot !! :( ) :D Bruno

Share this post


Link to post
Share on other sites

SEARCHING

 

Imagine you just downloaded or installed a program and you have no clue where is is gone. There are several ways to perform search.

 

The most easy ones are:

$ whereis gkrellm

or

$ locate gkrellm

( if gkrellm is the program you're after )

 

Note: for locate to work you have to create a database for fast searching :

 

$ su
< password >
# updatedb

 

Cron will keep your database up to date on a daily basis.

 

Special characters: * \ [....] [!....] ?

 

* = matches a random string of characters

\ = the "escape sign", the character or space after this sign is ignored

? = matches 1 random character

[a-d] = matches a, b, c, d

[!a-d] = does not match a, b, c, d

[a-dA-D] = matches a, b, c, d, A, B, C, D

 

Now let's do some Magic:

 

$ ls /etc/*conf

( Will list all files in the /etc dir that end with conf including conf )

 

$ ls /etc/[!g-z]*

( Will list all files in /etc/ that do not start with the letters g to z )

 

$ locate *doc

( Will produce a long list of the files ending on doc on your computer )

 

Because this list is very long, and we might want to keep it:

 

$ locate *doc >alldocs

( Will create a textfile called alldocs in your /home listing all the doc files crowding your computer. ( Notice the speed of you lovely Linux system ) )

 

$ ls /mnt/win_c/My\ Documents/*txt

( Will make a list of all your txt files it finds in your C:\windows\My Documents. )

Note: Linux does not like spaces in names ! So in My\ Documents, the \ tells it to ignore the next character. An other way to do it is "My Documents".

 

Another, but somewhat complicated command for searching is "find". See for instructions how to use it: The Find Command

 

More Magic:

 

The Tab key autocompletes:

 

Try this, < cd /u > and press tab now add an "s" and press tab, give an "h" and press tab, now we have got < cd /usr/share/ >

 

OK lets go on, type a "f" "o" "n" tab "t" tab "d" tab. < Enter >

Now we are in /usr/share/fonts/ttf/decoratives.

 

< ls > will give you a list of all the fancy ttf fonts on your system.

< cd .. > , < cd western > , < ls > gives you a list of all normal ttf fonts.

 

So now you know where to install all those extra fonts you can find on the net.

B) Bruno

Share this post


Link to post
Share on other sites

INSTALLING SOFTWARE

URPMI

 

Software comes in many different kind of packages deb, rpm and tarball are the most popular, but there are a bunch of other ones too, just take the Firefox browser; just unpacking it and creating a shortcut from the firefox script to the desktop is all there is to it !

Tarballs can be a real problem because of lib dependencies ( The nightmare of every Linux starter ! )

 

Today we'll introduce you to urpmi, a kind of rpm with gold-plating, because all dependencies are taken care of automatically.

You have to be on-line to download and install the packages though !

Urpmi does not only download the rpm you want but also all packages needed to make the install successful , easy as cake !

 

In Mandriva you can use the graphical software manager in the Mandriva Control Center, it uses urpmi by clicking on a few buttons.

But there is a much faster way of installing software using urpmi on the commandline and you will be surprised how easy it actually is

 

An example, installing the gkrellm package ( system monitors ) would type the command:

# urpmi gkrellm

 

. . . and if you want to install both the program with the plugins and the themes in one go you do

# urpmi gkrellm gkrellm-plugins gkrellm-themes

 

Then, if you want to remove/uninstall gkrellm you do

# urpme gkrellm

 

Well, that was easy enough wasn't it ? And like I said: urpmi resolves dependencies but does need an working net connection.

 

To update the urpmi sources you do "urpmi.update -a"

 

B) Bruno

Share this post


Link to post
Share on other sites

YaST for SUSESuse uses it's own package management system.I call on Zox, Greengeek and ComputerBob to please write us a few lines about it. :P Bruno

Share this post


Link to post
Share on other sites

Thanks for your input LilBambi.What distro are u using yourself ? Was it Mandrake or RedHat ? I'm a bit confused now, was sure it was Mandrake. . . ? :P Bruno

Share this post


Link to post
Share on other sites
Thanks for your input LilBambi.What distro are u using yourself ? Was it Mandrake or RedHat ? I'm a bit confused now, was sure it was Mandrake. . . ? :P Bruno
Sorry Bruno -- I should have been clear on that point ... Actually it is both ... Mandrake (since 7.0) and RedHat (since 6.0).I am currently using RedHat 7.2 on my alternate computer (through KVM switch) but we have 11 networked boxes here. Mainly with versions of Mandrake and RedHat on them. We also have one Win95 (dualboot) and one Win98se (solo box). In addition we have a couple freeBSD installations (standalone and dualboot).So the confusion was quite understandable :P

Share this post


Link to post
Share on other sites
I am currently using RedHat 7.2 on my alternate computer (through KVM switch) but we have 11 networked boxes here. Mainly with versions of Mandrake and RedHat on them. We also have one Win95 (dualboot) and one Win98se (solo box). In addition we have a couple freeBSD installations (standalone and dualboot).
Does that mean I can ask you to write a few lines about easy software install in RedHat ? Please ?And what about freeBSD ? You and ThunderRiver look like the only ones that could be able to shed some light on software install in freeBSD. Do they use RPM ? Tarballs ?See, we have lots of questions in this forum, are hungry for answers, and would appreciate your expertise. :P Bruno

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...