Bill's Linux FAQ

HOME

Basic Linux Commands, Tricks
I am using Mandrake 9.2 currently, KDE 3.1, Linux version 2.4.22-10mdk
NB Mandrake 9.2 CDs do not include the kernel source, You need to download to make any alterations to your system
These are some useful commands/tricks I have learned while playing with Linux
Many thanks to all those who have shared their information, some of which is included here!
All care taken and most of this works on my Dell Inspiron 2650,
but I can not take any responsibility for you using this information!
Command Action Comment
Mandrake Commands

Drakconf Mandrake Control Centre
Drakfloppy Floppy Disk
Diskdrake Hard Disk
Menudrake Mandrake Menu
Rpmdrake Mandrake RPM Manager
Userdrake Manage Users



Modem (PCI/IRQ) Commands

clear Clear Screen
cd .. Up one level
lspcidrake List PCI Bus
lspci List PCI Bus
uname -r Kernel Name
ls -al List recent files
ls -l /dev/modem List Modem details
modprobe

Rpmdrake RPM manager
cat /proc/interrupts Show IRQ Interrupts
lsmod List Loaded Modules
kppp ISP Dialer
lspci -v List PCI Bus IO IRQ
Cal Displays a calendar
dmesg Messages
drakconf Mandrake Control Centre
make uninstall Uninstall an RPM
lspci -n List IRQ
tail /var/log/messages Last Messages from Kernel
/etc/modules.conf Modules Configuration File
cat /proc/pci List PCI Bus IO IRQ
updatedb Update RPM Database
cat /proc/version Kernel Version



Misc

./configure –with-hal=i8xx PCTel Modem
Start > Settings > Kappfinder To add to KDE menu
CRTL+ALT+ESC Kill a Process
/ Root
/ Needed in front of directory normally /etc/lilo.conf
/etc Directory containing Configuration files
/home/username Users Home Directory, usually when in root



Make/Install an RPM

cd to package location
rpm -i package full name Unpack RPM
ls to see what you have List
cd to package directory
./configure or ./setup Initial setup
cd
ls
make Make files
make install Install
insmod -f pctel Force into Kernel
insmod -f ptserial Force into Kernel



General Commands

CD /Documents Change directory
mkdir new/DIR Make Directory
rmdir /home/leftfieldnz/test Remove Directory
cp Copy Files
passwd username passwd username
locate filename locate filename
mv Move Files
xkill Kills a running program
exit Exits the terminal
reboot Reboots the system
halt Shutsdown the computer
poweroff Shutsdown the computer (works better on mine)
startx Starts xwindows from terminal (GUI)
man name Shows help files
info name Shows help files
--help Help shows help files
su Allow you to login as Super User
ls "Lists" the contents of the directory
pwd Displays "present working directory"
clear Clears the terminal window
date Displays current date and time
cal Displays a calendar
uptime Displays time since last reboot
df Displays the disk usage on partitions
du Displays disk usage of directory
id Displays your identification to system
groups Displays groups of current user
ulimit -a Displays users limits
uname Displays name of machine logged into
who Displays "who" is logged on the system
w Similar to "who"
rm Remove file
free Free Memory
ifconfig IP/Ethernet Info From Root
chmod 2777 /dir/file Change Permissions to all on a dir and/or file
mount /dev/sda /mnt/stick Mount USB Stick
umount /dev/sda /mnt/stick UnMount USB Stick
route IP Route From Root
samba stop Stop Samba
samba start Start Samba
ping 192.168.0.1 Ping Server
testpram /etc/samba/smb.conf Test Samba Configuration
smbpasswd -a bill Create a Samba Password
adduser username

CTRL+Z Kills a running program in terminal
fdisk -l Disk/Partition information From Root
Login To login as a different user
su superuser To be able to write and apend stuff
cat /proc/scsi/scsi Catalogue SCSI devices
tail -s 3 -f /var/log/messages View the Kernel Log
lsmod | more List Modules with more info
modprobe usb-storage
mount /dev/hdc /mnt/cdrom Mount a Device
umount /mnt/cdrom Unmount a device
dmesg Check the messages
chmod 2777 Change the permissions to all
cd /home/leftfieldnz Change directory
ls -l List files with detail
cd Change to root directory
mkdir /mnt/disc Make Directory
rm Remove Directory
cp Copy Files
kate /etc/fstab Edit fstab info about the filesystems Can use your favourite text editor
kate /etc/samba.smb.conf Edit Samba Network with Windows Machines
kate /etc/mtab

kate /etc/X11/XF86Config Edit
kate /etc/lilo.conf Edit boot sequence /sbin/lilo -v to reset boot
aumix Audio Mixer
kmix Audio Mixer
modprobe usb-uhci Probe USB
CTRL+C End Script
CTRL+ALT+ESC Kill a Application
more /proc/interrupts More Info on IRQ
uname -a Kernel source number
lsmod | grep - usb

lsmod | grep - scsi

kate /etc/rc.d/rc.local

ls /proc/acpi ACPI power management
Smb: Mount Windows Network Usually from Nautilus or similar program
file:/mnt/ Mount point for Drives (HDD, CD, Floppy)
file:/home Home Directory Your Files, Documents
fdisk -l /dev/usb Partition information Use /dev/whatever for your drives
/etc/passwd

clear Clear Screen
modprobe scsi_mod

modprobe usb-uhci

ls -l /dev/stick

kate /etc/modules.conf Use Kate Editor to alter Modules Config Also like Kedit or Emacs if no GUI
Emacs /etc/lilo.conf Non GUI Editor (edit lilo boot) F10 gives you the menu at bot screen
Dmseg Should give you some info as to what is going on
/usr/bin Programs Location



SAMBA Windows Network Tool
testparm /etc/samba/smb.conf Test Samba Configuration
http://localhost:901/ To access SWAT Configuration Wizard
smbclient -L yourhostname

/etc/passwd
Usually from Root with Kate or Emacs editor
/etc/lilo.conf Kate /etc/lilo.conf Edit lilo boot from root
/etc/samba/smb.conf

/etc/fstab information about the filesystems
/etc/X11/XF86Config X Config GUI



Ln Create a Symbolic Link Still getting to grips with this!






Have fun!



Bill Rosoman
[email protected]
http://leftfieldnz.topcities.com
Feb 2004



HOME
Hosted by www.Geocities.ws

1