Friday, July 24, 2009

System Commands

#uname -a
version and system architecture

#cat /etc/issue
Name and version of Linux Distro

#grep MemTotal /proc/meminfo
RAM total seen by the system

#cat /proc/version
Linux version

#date
system date

#cal
Calender

#cal -3
Three month calender

#lspci
-tv
PCI and Adapter info

#last reboot
system reboot history

#badblocks -s /dev/sda
Test for unreadable blocks on disk sda

#tail -f /var/log/messages
check messages in a log file

#free -m
RAM remaining in MB

#fdisk -l
Disks partitions sizes and types

#df -h
free space on filesystems

# fsck /dev/hda1
Repair / check integrity of linux filesystem on disk hda1

# fsck.ext3 /dev/hda1
repair / check integrity of ext3 filesystem on disk hda1

# mkfs /dev/hda1
>> create a filesystem type linux on hda1 partition

# mkfs -t vfat 32 -F /dev/hda1
>> create a FAT32 filesystem

# mkswap /dev/hda3
>> create a swap filesystem

# swapon /dev/hda3
>> Activate a new swap partition

No comments:

Post a Comment