Linux info & Stuff
this file is created with the Debian distribution of LINUX in mind .
(Debian kernel compile)
| /usr/src/linux | make menuconfig (creates /usr/src/linux/.config) |
| /usr/src/linux/ | make-kpkg clean |
| /usr/src/linux | make-kpkg -revision x.x kernel-image |
| (replace x.x with YOUR numbering system) | |
| /usr/src/ | dpkg -i kernel-image-x.x-.deb |
| (replace the x.x with the numbers you chose above) |
/vmlinuz is a symbolic link to the current kernel image
(Hand kernel compile)
| /usr/src/linux | make menuconfig |
| /usr/src/linux | make dep |
| /usr/src/linux | make clean |
| /usr/src/linux | make bzImage |
| /usr/src/linux | make modules |
| /usr/src/linux | make modules_install |
| /usr/src/linux | cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-{kernel version} |
| /usr/src/linux | rm -f /vmlinuz |
| /usr/src/linux | ln -s /boot/vmlinuz-{kernel version} /vmlinuz |
| /usr/src/linux | lilo |
| to create a boot disk | method #1 |
| dd if=/vmlinuz of=/dev/fd0 | |
| rdev /dev/fd0 /dev/hdxx | {replace xx with root partition info (see /etc/fstab) } |
| rdev -R /dev/fd0 1 | this is the number 1 (one) and not a small L |
| to create a boot disk | method #2 |
| cd /usr/src/linux | compiles current kernel & creates a boot disk ONLY |
| make zdisk |
| Printer Control | |
| lpr {file} | send {file} to printer |
| lpr -p {file} | send {file} to printer and give it a pretty format {file name, date, time} |
| lpr -P{printer}{file} | to print to a remote printer specified in /etc/printcap |
| lpq | shows what jobs are in print queue |
| lpq -P{printer} | shows what jobs are in print queue of {printer} |
| lprm {job #} | to remove jobs from print queue |
| Installing software & locating installed packages | |
| dselect | debian configuration program {Add/Remove software} |
| dpkg -l | less | show everything installed |
| dpkg -l | grep{keyword} | find {keyword} in the dpkg -l listing |
| Files to customize user/global setup | |
| /etc/profile | global settings |
| /home/{user}/.bash_profile | individual settings |
| Drive/printer mapping | |
| /etc/fstab | drive mapping and mounting within linux |
| /etc/smb.conf | specifies which directories to share to wfw clients |
| killall -HUP inetd | to restart inetd.conf after edits |
| /etc/exports | to share nfs drives |
| /etc/init.d/nfs-server {start/stop} | to start, stop, or restart nfs sharing |
| smbclient -L {machine} | lists what is shared on {machine} |
| TAR commands | |
| tar -xzf {file.tgz} | to untar, unzip a tgz file |
| tar -czf /where/filename /what | to tar files |
| tar -tzf {tar filename} | to verify tar file |
| tar -xf /where/filename/what | to untar files {w/o .tgz} |
| tar -cvzf /dev/ftape /{files} | to tar to tape |
| tar -dzf /dev/ftape /where | to compare a tape archive |
| tar - tzf /dev/ftape | to verify tar to tape |
| tar -xvzf /dev/ftape | to restore tar from tape |
| Tape Backup Control Commands | |
| mt -f /dev/ftape erase | to erase a tape (unsure if works) |
| mt -f /dev/ftape rewind | to rewind a tape |
| mt -f /dev/ftape retension | to retension a tape |
| Drive manipulation | |
| superformat /dev/fd0 | to format a floppy in fd0 |
| mke2fs /dev/hd?? | to format a hard drive in ext2 (LINUX) format |
| LILO: linux emergency | to boot in EMERGENCY mode |
| rescue root=/dev/hdxx | boot onto Rescue disk, enter this at BOOT: prompt to access active partition for emergency repairs. Replace xx with root partition (see /etc/fstab) |
| e2fsck -b 8192 /dev/hdxx | clean hard drive partition xx |
| mount -n -o remount,rw / | to make mount root as read/write while in emergency mode |
| Directory listing commands | |
| du | shows total size of dir and subdir(s) |
| ls | directory listing |
| ls -l | long directory listing |
| ls -lAF | shows it all |
| ls | less | screen full at a time w/ scroll ability |
| ls | more | screen full at a time |
| PPP-networking files/dirs & info | |
| /etc/ppp/ip-up | is a file to execute after IP connections are established |
| /etc/ppp/ip-down | is a file to execute after IP connections are disconnected |
| /etc/ppp/ip-up.d/ | is a directory containing files to be executed upon ppp connection |
| /etc/ppp/ip-down.d/ | is a directory containing files to be executed after ppp connection is down |
| /etc/ppp/peers/{filename} | set the modem port, speed & pppd options for {filename} |
| /etc/chatscripts/{filename} | set phone number, username and password for {filename} |
| /etc/chatscripts/provider | this is a "default file" called by pon. sets ISP info u: p: |
| /etc/ppp/peers/provider | this is a "default file" called by pon. set modem port ttyS?, mode, etc |
| /etc/mgetty/login.conf | to enable the AUTO_PPP functions (allow dial-up users ppp access) |
| /etc/ppp/pap-secrets | file to edit to specify passwords to dial into providers or for user to dial into your box, via ppp. MUST BE PERMISSIONS 600 |
| pon | to connect to the net using defaults in /etc/ppp/peers/provider |
| pon {account} | to connect to net using a specified account |
| poff | to disconnect from net |
| plog | to view the ppp log |
| plog -f | to "tail" the ppp log (show entries as they occur) |
| /etc/resolv.conf | nameservers (DNS servers) |
| /etc/init.d/network | specifies IP, NETMASK, BROADCAST, etc and sets up system networking. |
| /etc/inetd.conf | specifies what "services" are offered (i.e. telnet, ftp, news, etc) |
| killall -HUP inetd | to restart inetd.conf after edits |
| VT, getty, mgetty, vgetty, run-level (/etc/inittab) file | |
| /etc/inittab | set gettys, mgetty, vgetty |
| telinit q | to restart /etc/inittab after edits |
| IP Masq'ing info | |
| /usr/local/sbin/masq_up {script I used to begin IP Masq} | |
| #!/bin/sh | |
| ipfwadm -F -p deny | |
| ipfwadm -F -a m -S 192.168.1.1/24 -D 0.0.0.0/0 | |
| insmod `ls /lib/modules/2.0.x/ipv4/*` | |
| replace the small x with the current kernel version | |
| or place the ipfwadm lines into the bottom of the /etc/init.d/network file to automatically begin ip_masq (during boot) as the network is started |
| Miscellaneous Info | |
| dmesg | less | to review boot-up message screens |
| locate {keyword} | to find all occurrences of {keyword} on all mapped drives |
| updatedb | updates database of files on all mapped drives |
| /sbin/make whatis | creates apropos and whatis data base |
| #! /bin/sh | first 'common' line of executed scripts |
| cat [sound file] > /dev/audio | to test sound card |
| grep "{keyword}" /{path}/* | to search for {keyword}in {path} location |
| /usr/X11/bin/xf86config | text based X configuration program |
| /usr/X11/bin/XF86Setup | GUI based X configuration program |
| /etc/X11/fvwm95/system.fvwm2rc95 | edits button bar for fvwm95 in X |
| cd /etc/X11/xinit | if missing xinitrc |
| ln -s ../Xsession xinitrc | |
| tail -f /var/spool/{logfile} | to see each entry as it happens |
| zcat /path/manpage | groff -Tascii -man | lpr | to print manpages |
| adduser "user" "group" | to add users to a group |
| /usr/sbin/addftpuser | setup ftp server |
| free | tells how much RAM, swap, etc space is free |
| reset | reset "no typing" sessions |
| ^v^o {control v, control o} | reset "mode" problem |
| /etc/rc.boot/0setserial | to "hard set" serial port addresses |
| LOG FILES TO WATCH | |
| /var/log/xferlog* | |
| /var/log/mgetty/* | |
| /var/log/messages | |
| /var/log/auth.log | |
| /var/log/syslog |
| "/proc is your FRIEND! Pay attention to it" | |
| /proc/filesystems | file systems supported by active kernel |
| /proc/interrupts | IRQ's currently in use |
| /proc/ioports | I/O ports currently in use |
| MODULES | |
| /lib/modules/2.x.x | where modules for kernel 2.x.x reside |
| rmmod {module name} | to remove a module |
| lsmod | to show all modules installed |
| modprobe {module name} | inserts modules |
| modconf | GUI for modules selection |
SSH simple setup
| ssh-keygen | Generate a key on each machine, as root, without using a pass-phrase |
| cat identity.pub >> /root/.ssh/authorized_keys | copy the .ssh/idenity.pub to the remote machines and append it into the /root/.ssh/authorized_keys file |
LINUX installation
ftp://debian.coinet.com/pub/debian ftp installs
This is the short version. The long version can be found on the net at ftp://debian.coinet.com/pub/bo/disks-i386/install.html.
Download the following files;
resc1440.bin Rescue Disk
drv1440.bin Driver Disk
base-1.bin Base disk #1
base-2.bin Base disk #2
base-3.bin Base disk #3
base-4.bin Base disk #4
base-5.bin Base disk #5
rawrite2.exe
Find two (2) "good" disks. If they aren't perfect, it WON'T work.
Create the all the disks using rawrite,
ie "rawrite2 -f resc1440.bin -d a:".
OR
ie "rawrite" and follow the prompts
Boot with the rescue disk, fdisk & format the hard drive, put in the driver disk when it asks.
Follow with the Drivers and appropriate BASE disks as prompted.
dselect info for ftp installs
ftp site=debian.coinet.com
passive=y
username=anonymous
password="whatever"
debian=/pub/debian
stable non-free contrib
USING APT
/etc/apt/source.list should contain;
http://debian.coinet.com/debian stable main contrib non-free
http://non-us.debian.org/debian-non-US unstable/binary-$(ARCH)/
www.debian.org has a good list of mirror sites for both non-free and standard
My Current /etc/apt/sources.list file:
deb http://debian.coinet.com/debian stable main contrib non-free
#deb http://non-us.debian.org/debian-non-US unstable/binary-$(ARCH)/
deb ftp://ftp.jimpick.com/pub/mirrors/debian-non-US unstable/non-US/binary-$(ARCH)/
ircII commands
/exec -o {command or file} execute a LINUX command
/window new
/bind ^a next_window
/window level ALL Send messages, ctci, etc. to new window
Pine setup
{mail.coinet.com} /var/spool/mail/griz Inbox folder
DOSEMU
In CONFIG.SYS;
DEVICE=EMUFS.SYS /mnt/dos
DEVICE=EMUFS.SYS /mnt/data2
DEVICE=EMUFS.SYS /mnt/data3 etc...
In AUTOEXEC.BAT;
PATH=C:\
| exitemu | to leave DOSEMU |
| dos -A | to boot from A: |
| /etc/dosemu/conf | to configure dosemu |