Linux Commands

Basic

rm -rf :remove dir recursively

bzip2 -dk : unzip bz2 files and keep src

tar -xvf :untar

tar -xvjf : filter thru bzip2, z=gzip

ps -A :List all processes

ps aux: same with more info

fgrep :Find text

netstat :ports in use

uname – r : kernel versionl

drakconf: configure

df: diskfree

du: disk usage, shows full path

locate: Find files, indexed nightly

find -name ’*.txt’: Find files recursively

Install

urpmi

Site: mandrivausers.org/easyurpmi

Site: rpmfind.net

urpmi.update.a :updates all media

/etc/mandriva-release :which ver

Resetting password

  1. reboot
  2. pause at Lilo
  3. linux init=/bin/bash
  4. cd /etc
  5. mount -o rw,remount
  6. chmod u+w shadow
  7. vi shadow
  8. On root line, take out everything betwee 1st and 2nd colon
  9. chmod u-w shadow
  10. reboot
  11. su and change passwood

VI

dd : delete line

p: put back

u: undo

y: yank into copy buffer

ctrl-v: mark

:quit! : exit w/o save

:help

Auto Start

/etc/init.d

chkconfig—add

Courier

/usr/local/etc/authlib

/usr/lib/courier/bin :execs

/usr/lib/courier/share :execs

/usr/lib/courier/etc :aliases

/usr/lib/courier/var/msgq: msg Q

./configure LDFLAGS=”-lpthread”

mailq: to see msgs in queue

cancelmsg: cancel a msg

Bind

/etc/named.conf

named start

/car/named :zone files

Libraries

add to /etc/ld.so.conf

run ldconfig

Settings

.tcshrc

.bashrc

/etc/bashrc

RPM

rpmfind.net

urpmi : to update

urpmq : to check

Squid

Port 3128