Linux Notes

These Linux Notes are based on Redhat 7. If your using them, some knowlege of Linux is assumed, these are here mainly so I don't have to remember them.

Some Notes on installing Bluetooth on a Redhat 7.3 Linux Box
Controlling a SliMp3 Player using Bluetooth

Command What it Does
make menuconfig Easy(ier) kernel editor
/usr/sbin/ntsysv To configure what services run at bootup
find . -name <file> -print Find a file, and show its location
find . -name "*" -exec grep -l "<some text>" {} ";" Find some text within an unknown file and display the name of that file.
tar czvf <destination> <source> To TAR and compress a directory
gunzip -c <filename>.gz | less To view the text of a gzipped file
rm -rf /<directory>/ DELTREE equivalent
(use with caution)
mount -t iso9660 /dev/cdrom /mnt To mount a CD-ROM disc
ps aex | less Show all processes
/sbin/pump -i eth0 --status To check the IP status of an NIC (in this case eth0).
ifconfig Tells you your IP and MAC address(es).
mkisofs -r -o name_of.iso /directory_of_files Will create an ISO image with the contents of the directory in it.
dd if=/dev/cdrom of=/somewhere/name_of.iso Will copy a CD to an ISO image.
mount /dir/name_of.iso /mnt/iso/ -t iso9660 -o loop Mounts an ISO file
uname -a Display the kernel version

Installing a new Hard Drive

The example shown installs a new volume called home2. Use the volume name so that it can be mounted automatically in /etc/fstab and if the hard drives are changed at a later date it'll still mount correctly.

Note: The <device> name changes once you have finished setting up the partitions with cfdisk, eg. /dev/hdb becomes /dev/hdb1 /dev/hdb2 /dev/hdb3 etc… depending of the number of partitions you have created.

Command Example Notes
cfdisk <device>
cfdisk /dev/hdb A version of fdisk
mkfs.ext2 <device>
mkfs.ext2 /dev/hdb1 Format the drive
e2label <device> <vol name>
e2label /dev/hdb1 /home2 Set the Volume Name
mkdir <vol name>
mkdir /home2 Make the volume directory
mount -t ext2 <device> <vol name>
mount -t ext2 /dev/hdb1 /home2
Mount the drive
pico /etc/fstab   Edit fstab as appropriate

If you want to replace your home volume with a bigger hard drive follow the steps above (except mkdir), and use e2label to rename the existing /home to /home2 then name the new hard disk /home when you re-boot the new hard drive will be mounted instead. Don't forget to copy everything across.

RJ-45 (Cat 5) Connections

Pin one is on the left, looking onto the gold connectors. With the catch on the bottom

Ordinary Cable Crossover cable
both ends are the same
connector one
connector two
1.
White Orange Data TX+
1.
White Orange
1.
White Green
2.
Orange Data TX-
2.
Orange
2.
Green
3.
White Green Data RX+
3.
White Green
3.
White Orange
4.
Blue  
4.
Blue
4.
Blue
5.
White Blue  
5.
White Blue
5.
White Blue
6.
Green Data RX-
6.
Green
6.
Orange
7.
White Brown  
7.
White Brown
7.
White Brown
8.
Brown  
8.
Brown
8.
Brown

• This Page is best viewed using a Computer •
• all images and html/php code © Karl McAuley 2003 - 2010 •