Pages

Saturday, August 20, 2011

Linux commands for hardware and new installation


For Hardware Failure Please call Shailesh @ +919769494144 mail us:shailesh.bhanushali@infotrendz.com or visit us on http://www.infotrendz.com/




list hardware configuration




dmesg (if you're lucky)



cat /var/log/dmesg



/proc/*



lshw



dmidecode



lspci



lspnp



lsscsi



lsusb



lsmod



(SUSE) hwinfo



/sys/devices/*







tape device



/dev/st0





read a disk label



fdisk -l





whole disk in partition



cfdisk



fdisk



e2label





partition a disk



parted (if you have it)cfdisk



fdisk



pdisk (on a MAC)

(deb) mac-fdisk (on a MAC)

(md) diskdrake





show/set kernel parameters



/proc/*



/proc/sys/*



sysctl



/etc/sysctl.conf





startup scripts



/etc/rc* (but may vary)



/etc/init.d/





shutdown (& power off if possible)



shutdown -Ph now



shutdown -y -g0 -i0



halt



poweroff





run levels *=normal states



(set in /etc/inittab)



0: halt



s,S,1: vendor-dependent



1: single-user



2-5*: multiuser



6: reboot







check swap space



swapon -s



cat /proc/meminfo



cat /proc/swaps



free





file system description



/etc/fstab





show network interface info



ifconfig ethtool





change IP



ifconfig

(rh) redhat-config-network



(fedora) system-config-network



(rh) edit: /etc/hosts,



/etc/sysconfig/network,



/etc/sysconfig/



network-scripts/



ifcfg-eth0



(deb) edit



/etc/network/interfaces;



/etc/init.d/networking



restart

For Hardware Failure Please call Shailesh @ +919769494144 mail us:shailesh.bhanushali@infotrendz.com or visit us on http://www.infotrendz.com/


No comments:

Post a Comment