Linux commands
Click on the headings to sort
Command | Common Arguments & Description | OS | Command Description |
---|---|---|---|
chkconfig | --list (Lists all of the services which chkconfig knows about, and whether they are stopped or started in each runlevel) | Redhat | Updates and queries runlevel info for system services |
dmidecode | (No arguments - Show description of system hardware components) | Linux | Dump a computer's DMI (SMBIOS) table contents |
echo | "- - -" > /sys/class/scsi_host/hostX/scan (Initiate a SCSI bus rescan, where X stands for the SCSI bus to be scanned) | Linux | Rescan a linux SCSI bus |
fdisk | -l (List partition tables for devices) | Linux | Partition table manipulator |
fdisk | /dev/sda1 (Run interactive menu on /dev/sda1) | Linux | Partition table manipulator |
lspci | -vv (Be very verbose and display info about all PCI buses and devices) | Linux | List all pci devices |
lsraid | -A -a /dev/md0 (Display a short listing of md0) | Linux | List and query Linux md devices |
lsscsi | -c (Classic output) | Linux | List all SCSI devices or hosts on system |
lvchange | -pr vg00/lv2 (changes permission of LV lv2 in VG vg00 to be read-only) | Linux | Changes attributes of a logical volume |
lvcreate | -L 2G -n datalv datavg (Create a 2GB LV named datalv in VG datavg) | Linux | Create an LV in an existing VG |
lvdisplay | -m (Display mapping of logical extents to physical volumes and extents) | Linux | Display attributes of a logical volume |
lvdisplay | -v (Display verbose info of all logical volumes such as status, size, associated VG etc) | Linux | Display attributes of a logical volume |
lvextend | -L 40G /dev/system/root (Extend LV "/dev/system/root" to size 40G) | Linux | Extend the size of a logical volume |
lvscan | Linux | Scan all disks for logical volumes | |
mdadm | --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc (Create a RAID 1 volume from two drives) | Linux | Create an MD (Multiple Device) software raid device |
mdadm | --detail /dev/md0 (View status of /dev/md0) | Linux | View status of MD (Multiple Device) software raid devices |
mdadm | -Es | grep md0 >>/etc/mdadm.conf (Add RAID device md0 to /etc/mdadm.conf so that it can be seen at boot) | Linux | Make MD (Multiple Device) software raid devices persistent at boot |
mkfs.ext3 | /dev/datavg/datalv (Create an ext3 file system on the LV) | Linux | Make an ext3 file system |
mkfs.reiserfs | /dev/datavg/datalv (Create a reiserfs file system on the LV) | Suse | Make a reiserfs file system |
mkswap | /dev/rootvg/swaplv (Sets up a linux swap area on the logical volume swaplv) | Linux | Format a device or file as a Linux swap area |
mount | -o loop disk1.iso /mnt/disk1 (Mounts disk1.iso on directory /mnt/disk1 as a loopback device | Linux | Mount an iso image via a loopback device |
mount | -o remount,rw / | Linux | Remounts / read write in failsafe or single user mode |
mount | -t iso9660 -o ro /dev/sr0 /mnt/cdrom (mount the CDROM in the cdrom drive /dev/sr0 onto /mnt/cdrom) | Linux | Mounting a CDROM |
mppUtil | -a (Print table of arrays currently detected by this host) | Linux | RDAC (a.k.a. MPP) Driver Utility |
pvcreate | /dev/sdd (Initialize /dev/sdd) | Linux | Initialize a disk or partition for use by LVM |
pvdisplay | -v (Display verbose info of all physical volumes, such as their associated volume group) | Linux | Display attributes of a physical volume |
resize_reiserfs | /dev/system/root (Resize the filesystem to the size of the LV) | Suse | Resize reiserfs filesytem |
service | ntpd start (Start the ntpd service) | Redhat | Start, stop or restart services |
SPident | -vvv (Maximum verbosity) | Suse | Try to identify service pack level |
swapon | -v /dev/rootvg/swap1lv (Enables the logical volume swap1lv as swap, with verbosity (-v)) | Linux | Specify devices on which paging and swapping occur |
sysctl | -a (Display all values currently available) | Linux | Configure kernel parameters at runtime |
sysctl | vm.swappiness=40 (Modify swappiness value - possible values 0 to 100; indicates the degree to which the kernel favours swap space over main memory, higher values favour swap) | Linux | Configure kernel parameters at runtime |
tune2fs | -m 1 /dev/system/logs (Set the percentage of reserved filesystem blocks to 1%) | Linux | Adjust tunable filesystem parameters on ext2/ext3 filesystems |
vgchange | -a y /dev/vg01 (Activate volume group vg01 or "-a n" to deactivate) | Linux | Changes attributes of a volume group |
vgcreate | vg00 /dev/sdd (Create VG called vg00 using /dev/sdd) | Linux | Create a volume group |
vgdisplay | -v (Display verbose info of all volume groups including the physical and logical volumes) | Linux | Display attributes of volume groups |
vgextend | vg00 /dev/sdd (Add /dev/sdd to existing volume group vg00) | Linux | Add physical volumes to a volume group |
yum | groupinstall "X Window System" "KDE Desktop" (Install X windows and KDE) | Linux | yum Yellowdog Updater Modified package management utility used on Redhat and CentOS |
yum | groupremove "KDE Desktop" groupremove_leaf_only=1 (Uninstall KDE, don't remove any packages that are required by any other packages or groups) | Linux | yum Yellowdog Updater Modified package management utility used on Redhat and CentOS |
yum | list updates (List packages in an enabled repository which is an update for any installed package) | Linux | yum Yellowdog Updater Modified package management utility used on Redhat and CentOS |
yum | update (Update all installed packages) | Linux | yum Yellowdog Updater Modified package management utility used on Redhat and CentOS |
yum | update httpd (Update the httpd package) | Linux | yum Yellowdog Updater Modified package management utility used on Redhat and CentOS |