TASK \ OS TASK \ OS TASK \ OS Show/Set EEPROM
Total Page:16
File Type:pdf, Size:1020Kb
TASK \ OS OS notes administrative GUI managing users TASK \ OS list hardware configuration unique id useful for licensing show/set EEPROM/NVRAM values add device without reboot remove device tape device stdin/ stdout/ stderr X kvm config TASK \ OS read a disk label whole disk in partition label a disk partition a disk TASK \ OS kernel show/set kernel parameters limit physical memory loaded kernel modules load module unload module make disk bootable startup scripts start/ stop/ config services shutdown (& power off if possible) run levels 1 *=normal states for more detail see www.phildev.net/runlevels.html show runlevel 1 time zone info check swap space bind process to CPU TASK \ OS "normal" filesystem volume-based filesystem file system description volume manipulation create filesystem create non-0-length empty file mount CDROM eject CDROM create/mount ISO image ACL management Fibre Channel / SAN TASK \ OS NFS share definitions NFS share command NFS information name resolution order show network interface info change IP start DHCP client ping one packet sniff network route definitions telnetd, ftpd banner set date/time (from net: ntp or other) TASK \ OS auditing encrypted passwords in min password length allow/deny root logins firewall config TASK \ OS show installed software file is in which package add software precompiled binaries of GPLware and freeware C compiler show patch level and/or patches patch tool configure/show runtime linking fortran-2000.com/ ArnaudRecipes/ sharedlib.html link library path tracing utility define user defaults csh global .login default syslog and messages system error reporting tool performance monitoring match process to file or port X pop-up Wikipedia FAQs (see also faqs.org) mailing list mailing list archives man pages www.freebsd.org/ cgi/man.cgi newsgroup(s) and forums groups.google user groups magazines vendor home page vendor docs and patches (see also man pages) vendor phone (US) wikis FreeBSD Derived from 4.4BSD-Lite and 386BSD. This table does not include external packages from /usr/ports. /stand/sysinstall pw adduser rmuser vipw chpass adduser rmuser pw vipw FreeBSD sysctl -a dmesg cat /var/run/dmesg./var/run/dmesg.bootboot pciconf -l eeprom (SPARC only) ?? ?? camcontrol atacontrol kldload ?? /dev/rsa0 /dev/fd/[012] Xorg -configure xf86config FreeBSD disklabel -r cc fdisk disklabel -wr sysinstall fdisk sysinstall FreeBSD /kernel /boot/kernel/kernel /boot/kernel.conf /boot/loader.conf sysctl /etc/sysctl.conf ?? kldstat kldload kldunload boot0cfg disklabel /etc/rc* (4-) /etc/rc.d/* (5+) /usr/local/etc/rc.d/* shutdown -p now 0: halt and power off 1: single-user mode 6: reboot c: block further logins q: rescan ttys(5) file kernel security levels: -1*: permanently insecure 0: insecure 1: secure 2: highly secure 3: network secure who -r sysctl kern.securelekern.securelevelvel /etc/localtime /usr/share/zoneinfo swapinfo pstat -s cpuset FreeBSD ufs/ffs/ufs2 (5+) ext2 ccd vinum geom (5+) /etc/fstab vinum ccdconfig geom (5.3+) gstripe (5.3+) gmirror (5.3+) graid3 (5.3+) newfs fsck fsdb clri truncate -s size [K|M|G] filename dd if=/dev/zero of= filename bs=size [b|k|m|g] \ count=desired mount /cdrom mount_cd9660 camcontrol eject devID mkisofs mdconfig; mount getfacl setfacl {get,set}{f,p}mac ?? FreeBSD /etc/exports kill -s HUP `cat /var/run/mountd.pid` nfsstat /etc/host.conf (4-) /etc/nsswitch.conf (5+) ifconfig -a edit /etc/rc.conf (option ifconfig_interfaifconfig_interfacename)cename) ifconfig dhclient ping -c 1 hostname tcpdump edit /etc/rc.conf (option defaultrouter) netstat -r route /etc/ftpwelcome date adjkerntz ntp (obs) timed FreeBSD auditd /etc/master.passwd /etc/login.access; /etc/ttys ipfw ipf pf pf pfctl FreeBSD pkg_info ls /var/db/pkg pkg_add -W file /stand/sysinstall /usr/ports make pkg_add portinstall (from /usr/ports) ftp.freebsd.org/ pub/FreeBSD http://www.freebsd.org/ /usr/bin/cc (gcc) uname -a (6.2+) csup cvsup or or cvs to update, then rebuild ldd ldconfig kldstat $LD_LIBRARY_PATH ktrace truss /etc/login.conf /etc/csh.login /var/log/messages dmesg send-pr fstat; nfsstat; systat; vmstat; netstat; uustat; top; iostat lsof sockstat /usr/local/bin/xmessage FreeBSD www.freebsd.org/doc/ en_US.ISO8859-1/books/faq lists.freebsd.org/mailman/listinfo lists.freebsd.org/mailman/listinfo www.freebsd.org/cgi/man.cgi comp.unix.bsd freebsd.misc www.freebsd.org/ support.html#user http://www.daemonnews.org/ http://www.freebsd.org/ www.freebsd.org/handbook www.freebsd.org/releases/ 925-674-0783 (FreeBSD Mall) ?? HHPP--UUXX LLiinnuuxx (rh)(rh) = Red Hat, Mandrake, SUSE,... (deb) = Debian, Libranet,... (fed) = Fedora (gen) = Gentoo (md) = Mandrake/Mandriva Hewlett-Packard (SUSE) = SUSE sam (rh, FC2+, RHEL4+) system-config* (rh) redhat-config* smh (11.31+) linuxconf (obsolete) (SUSE) yast2 (deb) dpkg-reconfigdpkg-reconfigureure (md) drakconf uusseerraadddd uusseerraadddd uusseerrddeell uusseerrmmoodd uusseerrmmoodd uusseerrddeell ggeettpprrppww aadddduusseerr mmooddpprrppww cchhaaggee ppwwggeett ggeetteenntt HHPP--UUXX LLiinnuuxx iioossccaann ddmmeessgg (if you're lucky) dmesg (if you're lucky) cat /var/log/dmesg aaddbb //pprroocc//** mmooddeell llsshhww stm (from the SupportPlus CDROM) dmidecode bdf (like most vendors' df ) ) lspci ggeettccoonnff llssppnnpp machinfo (11.23+) lsscsi pprriinntt__mmaanniiffeesstt llssuussbb lsmod (SUSE) hwinfo /sys/devices/* uname -i ?? sseettbboooott //ddeevv//nnvvrraamm (if you have it) ssttmm hhwwcclloocckk nvsetenv iinnff--ee uuddeevv (2.6+) ioscan -fnC devtype ;; uuddeevvttrriiggggeerr insf -C devtype modprobe kerneld insmod hotplug rrmmssff ??cardctl /dev/rmt/0m /dev/st0 ?? //ddeevv//ffdd//[012] xorgcfg xorgconfig Xorg -configure system-config-display xf86config XFree86 -configure redhat-config-xfree86 itemap /etc/X11/?dm HHPP--UUXX LLiinnuuxx scsimgr (11.31+) diskinfo pvdisplay fdisk -l /dev/hda (e.g. if /dev/hda1 ?? is a partition) cfdisk fdisk e2label pvcreate smh (11.31+) parted (if you have it) llvvccrreeaattee ccffddiisskk ssaamm ffddiisskk pdisk (on a MAC) (deb) mac-fdisk (on a MAC) (md) diskdrake HHPP--UUXX LLiinnuuxx /hpux (9)(9) /boot/vmlinuz* /stand/vmunix (10+) /boot/bootlx (see /etc/lilo.conf or /boot/grub/menu/boot/grub/menu.lst).lst) smh (11.31+) /proc/* ssyyssddeeffssaamm ssyyssccttll//pprroocc//ssyyss//** kmtune (11+) /etc/sysctl.conf kctune (11.23+) getconf ?? mmeemm==((iin nlliilloo..ccoonnf foor r//bboooott//ggrruubb//g grruubb..ccoonnff)) kkmmaaddmmiinn--ss llssmmoodd modprobe kmadmin -L insmod rmmod kmadmin -U modprobe -r (rh) mkbootdisk (deb) fdisk -A (and lilo to manipulate mbr) mkboot /etc/rc* (9)(9) /etc/rc* (but may vary) /etc/init.d/ /etc/rc.config.d (preferred) /sbin/rc* (10+) /sbin/init.d/ (rh) service (rh) chkconfig (deb) sysv-rc-conf shutdown -Ph now shutdown -y -g0 -i0 halt shutdown -yh 0 poweroff 00::sshhuut tddoowwnn ((sseettiinn //eettcc//iinniittttaabb)) ss,,SS::ssiinnggllee--uusseerr 00::hhaalltt 11::ssyyss aaddmmiinn ss,,SS,,11:: vendor-dependent 22::mmuullttiiuusseerr 11::ssiinnggllee--uusseerr 33**::sshhaarre eNNFFSS 22--55**::mmuullttiiuusseerr 44**::ssttaarrt tGGUUII 66::rreebboooott 5: user-defined 6: user-defined who -r /sbin/runlevel /usr/share/zoneinfo/ /usr/lib/tztab /etc/localtime catswapon /proc/meminfo -s cat /proc/swaps swapinfo free psrset -b mpsched -c intctl taskset (sched-utils) HHPP--UUXX LLiinnuuxx hhffss eexxtt22 vxfs (11.0+) ext3 ReiserFS jfs (vxfs) LVM, LVM2 LLVVMM EEVVMMSS VxVM($) VxVM($) /etc/checklist (9)(9) /etc/fstab (10+) /etc/fstab vvgg**;;llvv**; ;ppvv** ee22ffssaaddmm eexxtteennddffss llvvccrreeaattee ffssaaddmm llvvrreemmoovvee lvextend mmkkffss mmkkee22ffss nneewwffss mmkkrreeiisseerrffss mkdosfs mkfs.* ffsscckk ffsscckk ffssddbb ddeebbuuggffss e2undel dd if=/dev/zero of= filename bs=1024k count=desired prealloc ppffss__mmoouunnttdd mmoouunntt//mmnntt//ccddrroomm pfsd (deb) mount /cdrom pfs_mount mount /dev/dsk/cxtydz4 /SD_CDROM mount -orr /dev/cdrom /mnt/cdrom (requires "Rock Ridge extension" patches, 11+) ?? eject nnoohhuuppppffss__mmoouunnttdd&&;; mmkkiissooffss nohup pfsd&; pfs_mount -t iso9660 -x unix pathToIso moumountPointntPoint mount -o loop pathToIso mountPoint llssaaccll ggeettffaaccll cchhaaccll sseettffaaccll getacl setacl scsimgr (11.31+) fcmsutil fcdlist tdutil tdlist tddiag ?? HHPP--UUXX LLiinnuuxx //eettcc//eexxppoorrttss //eettcc//eexxppoorrttss eexxppoorrttffss--aa //eettcc//iinniitt..dd//nnffss--sseerrvveerrrreel looaadd share ((1111..3311++)) ((rrhh)) exportfs -a shareall (11.31+) share_nfs (11.31+) nnffssssttaatt ccaatt//pprroocc//mmoouunnttss /etc/nsswitch.conf /etc/nsswitch.conf /etc/resolv.conf nwmgr (11.31+) ifconfig llaannaaddmmiinn eetthhttooooll landiag lanscan netstat -in ifconfig lan x x //ssbbiinn//sseett__ppaarrmmssiinniittiiaall iiffccoonnffiigg ifconfig (rh) redhat-configredhat-config-network-network (fedora) system-config-netsystem-config-networkwork (rh) edit: / etc/hosts, /etc/sysconfig/network, /etc/sysconfig/ network-scripts/ ifcfg-eth0 (deb) edit /etc/network/interfaces; /etc/init.d/networking restart dhcpcd dhclient ?? ping hostname 10 1 (9)(9) ping hostname -n 1 (10+) ping -c 1 hostname nneettttll eetthheerrffiinndd nneettffmmtt ttccppdduummpp wireshark ( formerly ethereal) etherape /etc/rc.config.d/netconf route netstat -r (rh) /etc/sysconfig/network (rh) /etc/sysconfig/static-routes (deb) /etc/init.d/n/etc/init.d/networketwork (deb) /etc/network /etc/issue.net (telnet) (ftp varies; can use tcp wrappers) /etc/inetd.conf (telnet) ntpdate rdate netdate ntpdate HHPP--UUXX LLiinnuuxx audisp (2.6+) auditd aauuddeevveenntt //vvaarr//lloogg//ffaaiilllloogg