
Quick Tips & Cool Commands
Unpacking compressed archives.
gzip - .tar.gz
[doug@linux]$ tar -xvzf archivefile.tar.gz
bzip2 - .tar.bz2
[doug@linux]$ tar -jxvf archivefile.tar.bz2
Show disk space:
[doug@linux]$ df -h
Filesystem
Size Used Avail Use% Mounted on
/dev/hda6
1.3G 863M 420M 68% /
/dev/hda2
3.9G 1.6G 2.3G 40% /mnt/win/C
/dev/hda3
3.9G 1.7M 3.9G 1% /mnt/win/D
this is also a good way to see a list of mounted partitions.
Show directory size:
[doug@linux]$ du -hs
[doug@linux]$ du -hs /etc
4.6M /etc
Start a second X display:
go to another console, Ctrl-Alt-F2
login,
[doug@linux]$ startx -- :1
Show a list of partitions:
[doug@linux]$ cat /proc/partitions
major minor #blocks name
3
0 9770544 hda
3 1
1 hda1
3 2
4112608 hda2
3
3 4112640 hda3
3 5
136048 hda5
3
6 1406128 hda6
List installed modules:
[doug@linux]$ cat /proc/modules
or
[doug@linux]$ lsmod
To see the kernel startup messages:
[doug@linux]$ dmesg | less
Write kernel startup messages too a text file:
[doug@linux]$ dmesg > ~/dmesg.txt
To find your kernel version:
[doug@linux]$ uname -r
Show free memory:
[doug@linux]$ free -m
su access to X:
[doug@linux]$ xhost +localhost
To mount an ISO image file:
[doug@linux]$ mount -o loop -t iso9660
isofilename /mountpoint
You will need to replace
isofilename and mountpoint with the correct
file name and
mount point.
I suggest creating an empty directory to use as
the mount point.
"/mnt/iso", or
"/mnt/temp" would work.
Back to the Main Page