Examples on using some commands
From ArkWiki
Users and Perms: Note: "user" refers to your user. To set home dir: chown -R user:user /home/user
Perms: Scanner Permissions Fix: (As Root) find /proc/bus/usb |xargs chown arklinux to set the permissions so the current user can use the scanner. chown -R user /proc/bus/usb use the scanner. chown -R user /proc/bus/usb
Modifying pam.d directory files to recognize default user (arklinux) change: Edit /etc/passwd so that arklinux:x:500:500:Your Name:/home/user:/bin/bash reads: user:x:500:500:Your Name:/home/user:/bin/bash then: sed -i -e 's,arklinux,user,g' /etc/pam.d/* (sed -i -e 's,arklinux,user,g' /etc/pam.d/*)
dvdrecord perms to be able to burn cds: To burn cds as user: chmod 4755 /usr/bin/dvdrecord Permission Model: Owner/Group = root : RWX = User (all) : RX = Group : RX = Other How to erase a cdrw from the commandline: cdrecord blank=all dev=/dev/cd-device Misc: 4,646,093,089 leaves 50mbs of free space on a dvd. creating a symlink from the root commandline: ln -s source target
example: ln -s /dev/hdc /dev/dvd will create the symbolic link dvd which leads to the actual device hdc Kernel Line Mods: To boot into BASH: rw init=/bin/bash
HP Laserjet Printer Driver: service hplip restart
Fixing clock to EST: rm /etc/localtime ln -s /usr/share/zoneinfo/EST /etc/localtime apt-get update apt-get install ntp ntpdate -s time.apple.com hwclock --systohc date to check the date as root Correcting Time Stamp Errors: find . |xargs touch from within the directory of the files you want to retime stamp.
To start or restart a deamon or service: service cupsd stop service cupsd start service cupsd restart
Network/Internet: To list nic: ifconfig -a To Activate NIC: dhclient eth0, ifconfig eth0 down to take it down, to restart the network use service network restart
SwapPartitions: swapon -a that should get the ones in fstab... mkswap -v1 /dev/available_partition to make swap partitions cat /proc/swaps to see swaps listed
To check the kernel verison: uname -a
Protocol Info: see kinfocenter for details
To mount a drive while on a live CD: mount /dev/hda whatever # /mnt mount -t ext3 /dev/hda6 /mnt
To check your path:
echo $PATH
To rebuild modprobe.conf:
rm -rf /etc/pnp ; coldplug --scanPci
instructions on how to add a program to kapabilities
The basic idea is
mv /usr/bin/whatever /usr/sbin
ln -s consolehelper /usr/bin/whatever
cp /etc/pam.d/rootkonsole /etc/pam.d/whatever
cat >/etc/security/console.apps/whatever <<'EOF'
USER=root
PROGRAM=/usr/sbin/whatever
SESSION=true
FALLBACK=true
EOF
Apt-Get
apt-get update ; apt-get -t dockyard-devel install ntfs-3g
DVDRecord Perms
LINUX :
Display Current Config for all NIC?s: ifconfig
Display Current Config for eth0: ifconfig eth0
Assign IP: ifconfig eth0 192.168.1.2
Assign IP/Subnet: ifconfig eth0 192.168.1.2 netmask 255.255.255.0
Assign Default Gateway: route add default gw 192.168.1.1
Assign multiple IP?s: ifconfig eth0:0 192.168.1.2
Assign second IP: ifconfig eth0:1 192.168.1.3
Disable network card: ifconfig eth0 down
Enable network card: ifconfig eth0 up
View current routing table: route ?or? route -n
View arp cache: arp ?or? arp -n
Ping: ping -c 3 192.168.1.1
Trace Route: traceroute www.ossmall.info
Trace Path: tracepath www.ossmall.info
DNS Test: host www.ossmall.info
Advanced DNS Test: dig www.ossmall.info
Reverse Lookup: host 66.11.119.69
Advanced Reverse Lookup: dig -x 66.197.47.84
OpenOffice.org Web Browser Fix:
ln -f /usr/lib/ooo-2.3/program/kde-open-url /usr/lib/ooo-2.3/program/open-url (for 08)
ln -f /usr/lib/ooo-2.2/program/kde-open-url /usr/lib/ooo-2.2/program/open-url (for 07)
