LinuX Diary: notes on a better understanding.... this "notebook" by no means intends to substitute a real manual: Do GET one!!!!! 20:45 12/25/00 ------------------------------------------------------------------------------------------------------------------------------------ PARTITIONING PANICZ! 1. A guide on the HDD partitions -> the root (mount point: "/"), no more than 2GB or problems will start with LILO as well as the tree structure... you will end up trying to find where on earth you have that bleeding binary... Fdisk type: 83 (linux native) -> the boot (/boot), no more than 16MB or your bootstrap will be sllooowwwww and messy. Also linux native... ->the swap (/swap), fdisk type 82 (linux swap), at least as large as your RAM (physical memory). On a redhat 6.2 I strongly recomend 128MB (try not to go much over this value, it could slow down your processes). -> the "optional" (/opt or /var), use it to put up extra applications to your system so they can be retrieved and removed or modified easily... Will be quite necessary having this partition if your disk is large in order to avoid a root (/) bigger than 2GB (see above). -> the "home" (/home) is where user accounts can be found. Give some extra space over there if you plan to save "space-expensive" data like .mp3s and .wavs. It will be necessary if your root ends up >2GB otherwise. ;) -> do you really want to cut up other stuff like /etc, /usr and /usr/local? Think well... The linux filesystem is a relative one, so the more mount points you set, the better it should feel... However, fixed mount points can give you a bad headache if sizes are not well calculated based on the specific needs of the system: no room for stuff here but hudge spaces somewhere else... seems like throwing away half your disk.... 2. VFAT!!! Wanna see it from linux? No prob... ->just login as root (or su in a shell), start linuxconf, go to the section "access local drives", and add your fat32 partition on a mount point like /mnt/vfat or /mnt/dos. The actual physical device can be found under /dev/ and if you had windows running before putting up linux, it will probably be /dev/hda1. ->DO NOT mess arround with the partition's permissions as soon as you realise that only root has access... YES, ONLY root can work with the fat partition! If you do f*ck arround trying to make it visible to normal users, you can end up with the whole partition in "read-only" under windows and that means with windows totally fucked up... :((( Been there me too... So, fuck the manual's instructions! Too RISKY!!! ----------------------------------------------------------------------------------------------------------------------------------- DANGEROUS TOYZ: ->Linuxconf: the all-in-one configuration tool. Most useful, though everything gets quite easy, even actually losing your system. Keep an eye when kidding arround with this toy... :) Notice also sometimes it gets buggy, so segmentation faults won't be far away... don't worry most of the times gets the job done even while crashing. ->gtop: the Gnome (GUI) version of TOP (table of proccesses) utility that presents all the proccesses running in your system with priority, owner, time etc... Pretty useful, uhh? Gtop allows killing proccesses with a simple right-click rather than typing command... Be sure of what exactly is the... proccess you are about to kill: DO NOT touch system stuff like X (!!!!???!!) or anything with a wm in it (like kwm etc.) - it probably means window manager :PPP -. ->Xconfigurator (video, monitor, input devices), sndconfig (audio): DO NOT put stuff in there based on good luck, be SURE about it first. DO NOT run these configuration tools under X11 (the graphic environment that is - X-windows, right? :P ) ->Firewall: before putting it up, think... do you really need it? 'Cos it ain't gonna be easy... I f you really want to use this babe, then follow a manual or so while doing it. Once configured (firewall AND progs passing through it) try to leave it alone as much as possible, otherwise you will end up serving the comp all day and never leave the comp serve you! ->this section will probably grow up real fast!!!..... --------------------------------------------------------------------------------------------------------------------------------- DESKTOP/WINDOW MANAGER PREFERENCIES: ->KDE 1x: think of it as a thin-ice surface on top of whitch you can find -easily- pretty much everything. Cool user-friendly (almost windows-cloning) appearence and tools, quite light won't burn down your system resources... Probs: too "thin" and risky for administration procedures like setting up stuff,kfm (the KDE file manager) freaks out with hudge directories and/or by enabling the show thumbnails option, don't mess arround with its locale trying to put 3-4 different languages on the windows (it gets pretty messy) - though the international keyboard works fine, you can write in any language you like... Perfect for having fun and getting 10 in 1 jobs done under LinuX. ;) Does anybody still have this oldie version? ->KDE 2.x: heavier than its predecessor (grown up in parallel with the resources in pcs I guess) still quite light though. It's the price to pay for a notable and enjoyable increase in stability. Konqueror, the new file manager/browser/image-text viewer is HOT. Don't worry, it's not another StarOffice-like beast, cause what you think is Konqueror doing is actually done by a myriad of smaller indipendent programs executed upon request. Major improvements in the multimedia applications. Probs: no more kkbd (keyboard demon), the kboard layout is based on the X11 configuration files and that creates serious probs when trying to type in languages with no standard - latin charachters (greek for example). Solution at least for greek a non KDE app called GRkbd... ->GNOME: heavy, monolithic, secure! A real RAM burner, especially with the Enlightment window manager (the RedHat default...). It's not the easiest desktop environment for finding apps and running stuff, but it's pretty much configurable, so it can get to do exactly what you need from your comp. Really good for administrating your system. Admirable stability... Tip: try the Window Maker as window manager under GNOME, i find it more flexible and lighter! :PP ->Another Level: A desktop environment born for administrators!!! Perfect for Image-manipulation/rendering, stable to the bone, no kiddy-like extras eating up RAM and CPU. Use it if you have just one thing in mind and you wanna get it done fast and safe! Tip: try the AfterStep window manager with this one, matches better than stake with red wine! ;) ->Xfce: Fast, Light, Cute! Definatelly needs work to make it an independent DE (with own full-functionality file manager, a start menu with all apps present in the box etc.) ->amiWM: for the AMIGA dreamers, gives a Workbench look and feel. Unfortunately was developed by just one guy (and not a very capable one either), so you get a minimal (or should I say ridiculous?) functionality while any kind of configuration can be done only by manually editing config files with documentation about doing it almost absent! Try for fun but don't use it for every day computer life... ->perhaps I'll try something else too! :PPP ----------------------------------------------------------------------------------------------------------------------------------- MULTIUSER: IS IT REALLY CONVENIENT? ->The multiuser support on linux is a UNIX heredity which is most convenient but can turn out to be a disaster! ->NEVER give access in your system to persons you do not know PHYSICALLY AND TRUST! Once in the system, a clever hacker can gain root access in no time. ->always have a terminal open while in the inet, make frequent "who" and "netstat" commands, take a look or two on GTOP. On doubt, don't hesitate to close the ppp connection but don't do any panic-attack shutdowns or anything like that: it could be worse... Just disconnect, take a look at the proccesses running paying attention for a possible Trojan! -that means you should know which are the system processes and which not... ->sometimes you will find yourself working with others on your system: I find the write and talk commands most useful: #Write: on a bash type: write ENTER. Then type down your message, press ENTER and press CTRL+C to end the message. #Talk: type: talk ENTER. The term will split in two screens (one for each talking party) and you will wait until the counter-party types in his own bash "talk ". To close the dialogue, press CTRL+C. #Echo: only root (or su) can converge the echo messages to a term owned by another user. That means only root (or su) can use the echo command to communicate with other users in the system. First go on su within a term. Then type "who" to see on what terminal you can find the user-target. The response will probably look like: erebus :0 - OR erebus :0 - erebus pts/0 bash erebus tty0 bash dagon pts/1 bash dagon tty1 bash That means the user dagon is on a terminal found under /dev/pts/1 or (in the case of the second output, more likely in older LinuX systems) under /dev/tty1. So to echo a message to dagon just type: "echo >/dev/pts/1 (or >/dev/tty1 if that was the case in the who reply)" ENTER. ----------------------------------------------------------------------------------------------------------------------------------- PACKAGES: RPM vs gnoRPM vs Kpackage: ->gnoRPM: The GNOME cool-look + cool-tool GUI front-end for the RPM (RedHat Pakage Manager). A most convenient filtering of pakages that show up under specific categories in order to be easy-to-find even if you don't know exactly what you are looking for! However, once you get to use it (at least my version, I hope for better updates :-( ) you will find out that it f*cks up pretty often, even when the actual pakages are ok (it's not actually rare to find messed up .rpms even under official distribution CDs...). ->Kpackage: much more reliable than gnoRPM, though no useful filters and categories in a tree-like structure available... Best results under the GNOME desktop environment (see above, the desktop-preference section). Now that's what I call INTERCOMPATIBILITY!!!!!! ->RPM: text mode in a shell... The best way to get your job done safely and faultlessly. But you have to know both the commands AND the exact pakage you want to have installed in there... :PPPP ----------------------------------------------------------------------------------------------------------------------------------------------------- COMPILING THE KERNEL: ->If you got to read this notebook down to this section (without deleting it from your disk), well, you probably need a lot more experience before you can even think of compiling your kernel... Just stick around and get a new one (A STABLE ONE!!!) as soon as it gets on your distro site... ->Please Notice: the kernel versioning goes with a set of numbers x.x.xx-xx like 2.2.16-21 | | | | | | | revision: patches applied to the kernel | | release | version: all pare numbers (2,4,6,8,0) are stable while singles (1,3,5,7,9) are development ones | (don't mess with these) main number: main changes are made when this one changes: after almost 10years it's still 2!!! ---------------------------------------------------------------------------------------------------------------------------------------------------- THE SU COMMAND: ->Most commonly, while logged in as normal user (which should be your first choice, unless you plan to perform only administration tasks), you may need to perform tasks or access dirs permited only to root. And that's where the "su" command comes in: in a bash (or any other shell) type: su or: su - and press ENTER. The bash will ask for password (that is the root password) and, if correct, you will change to root@localhost.localdomain in regard to the ONLY commands or processes called by that bash you are logged as root (the one that you performed the su command). All other operations (outside that shell) will continue to be performed by your normal user account. ->all time classic: how do I perform an X11 executable as root while logged in as normal user (since only that bash changes to root with su)? Just call the exec from within the bash, dude! An example: login as normal user, open a shell and type su, changing to root, then while root, type linuxconf (an X11 admin tool only permited to root) and press ENTER: the utility will show up normally and the shell will remain blocked on the command linuxconf until you close it (it's the SHELL changed to root that performs the exec not YOU!). ->Still, su stands for Substitute User. So you can change to another user, any user! If you change from normal user to another one you will be asked for the second user's password (I can't think of any reasons to do so anyway...) but if you are root you can change freely to any normal user (and that is useful sometimes, like browsing on the inet or IRCing while root more safely). Just type: su . ----------------------------------------------------------------------------------------------------------------------------------------------------- "HOT" COMMANDS: ->to copy a file type cp . If the current directory in the shell is the one where the file is just type cp ->to move a file type mv . Same options of cp. If the target filename is under the same directory with the original one what you get is renaming the file. ->to delete a file type rm . To delete a dir type rm -R : the option R stands for recursive so the dir will be deleted with all files contained. Please note that in order to avoid confirmation prompts (especially for dirs containing numerous files, thus burning your time and patience) you can "force" deletion adding the parameter -f, but not always is a good idea! If you are not shure about the contents of a dir don't force it, you could regret it later!!! ->sooner or later you will find yourselves with a frozen application you need to kill. Even if the whole Xwindows are stuck DON'T physically reboot your system without the correct procedure (DON'T press that damn button on the pc's box)! If the whole Xsession is stuck you can't open a shell within either, so here comes that multiuser option to save you: press ALT+CTRL+F1-F6 and a new non-graphic logon prompt will show up. To return to the Xsession press ALT+CTRL+F7 and back again to the other text logon ALT+CTRL+whateverFyoupressedbefore. There are 2 ways to get rid of the frozen application: #Kill: type kill , that is the processes' id number you can find from top/gtop #killall: type killall adding the -e parameter for exact match of names if more than 1 app contain that string in their name. To get rid and restart a messed up Xsession without rebooting your system by that new logon type killall X . ->to view the network's open ports and traffic type netstat.