Friday, July 26, 2013

Common Linux Command

tar
tar -czvf myarchive.tgz mydirectory/

untar
tar -xzvf mystuff.tgz

mount cdrom
wodim --devices : find the cdrom device
 if wodim not found : apt-get install cdrecord
mkdir /media/cdrom  
mount -t iso9660 /dev/scd0 /media/cdrom : mount cdrom
mount -t iso9660 /dev/hdc /media/cdrom0/  : mount audio cd
 
 
kill gnome screen saver :
 ps -ef | grep amanda | grep gnome-screensaver
 kill -9 {screen saver id}
 
logout user from gnome :
 
   gnome-session-quit
or  
   pkill -u username   
 
1. arch

This command will show you the architecture of your system.

2. uname-m

This is another command to view the architecture of the system.

3. uname-r

This command is used to check the kernel version that is being used in the system.

4. dmidecode-q

This command give you the hardware components in your system.

5. hdparm-i / dev / hda

This is the command that shows the characteristics of your hard disk.

6. hdparm-tT / dev / sda

This command is used in order to conduct tests readings on hard drives.

7. cat / proc / cpuinfo

These commands can help you in getting CPU information.

8. cat / proc / interrupts

These commands are used to interrupt a process.

9. cat / proc / meminfo

This command verifies the memory usage in your system.

10. cat / proc / swaps

These commands are used in order to swap files.

11. cat / proc / version

These three commands can display the kernel version for your system.

12. cat / proc / net / dev

These four commands are used to view the network adapters and display statistics of the system.

13. cat / proc / mounts

This command shows you the mounted file system.

14. lspci-tv

If you need to view the PCI display devices then this is the command to use.

15. lsusb-tv

This is the command for displaying USB devices.



 
 
How to use tcpdump to detect Network Port Traffic
tcppdump dst mail.terangnusa.com and tcp port 587
tcpdump port 80tcpdump -i eth0
tcppdump -i eth0 dst port 25
 

No comments: