Tag Archives: linux
german keyboard layout linux
simulate high cpu usage on your linux machine
dd if=/dev/zero bs=100M | gzip | gzip -d | gzip | gzip -d | gzip | gzip -d > /dev/null
connect to your cisco device using ckermit tool
dmesg
[ 9476.461366] usb 4-5: Product: USB2.0-Ser!
[ 9476.461672] usb 4-5: configuration #1 chosen from 1 choice
[ 9476.579758] usbcore: registered new interface driver usbserial
[ 9476.579800] USB Serial support registered for generic
[ 9476.579856] usbcore: registered new interface driver usbserial_generic
[ 9476.579861] usbserial: USB Serial Driver core
[ 9476.582778] USB Serial support registered for ch341-uart
[ 9476.582797] ch341 4-5:1.0: ch341-uart converter detected
[ 9476.617800] usb 4-5: ch341-uart converter now attached to ttyUSB0
[ 9476.617838] usbcore: registered new interface driver ch341
aptitude install ckermit
vim ~/.kermrc
set line /dev/ttyUSB0
set speed 9600
set carrier-watch off
set handshake none
set flow-control none
robust
client-120:/home/bentoslack# kermit
C-Kermit 8.0.211, 10 Apr 2004, for Linux
Copyright (C) 1985, 2004,
Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/home/ibekyarov/) C-Kermit>connect
Connecting to /dev/ttyUSB0, speed 9600
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
Switch>
Switch>show version
Cisco Internetwork Operating System Software
IOS (tm) C3500XL Software (C3500XL-C3H2S-M), Version 12.0(5.3)WC(1), MAINTENANCE INTERIM SOFTWARE
Copyright (c) 1986-2001 by cisco Systems, Inc.
Compiled Mon 30-Apr-01 07:51 by devgoyal
Image text-base: 0x00003000, data-base: 0x003331F4
ROM: Bootstrap program is C3500XL boot loader
Switch uptime is 34 minutes
System returned to ROM by power-on
System image file is "flash:c3500XL-c3h2s-mz-120-5.3.WC.1.bin"
cisco WS-C3548-XL (PowerPC403) processor (revision 0x01) with 16384K/1024K bytes of memory.
Processor board ID FOC0548T066, with hardware revision 0x00
Last reset from power-on
make bootable usb flash drive with linux in MacOS X
bash-3.2# hdiutil convert -format UDRW -o Debian7live.img debian-live-7.0.0-i386-standard.iso
Reading Master Boot Record (MBR : 0)…
Reading Debian wheezy 20130505-06:54 (Apple_ISO : 1)…
Reading (Windows_NTFS_Hidden : 2)…
...........................................................................................................................................................................................................................
Elapsed Time: 4.551s
Speed: 118.2Mbytes/sec
Savings: 0.0%
created: /Users/bentoslack/Downloads/Debian7live.img.dmg
bash-3.2# mv Debian7live.img.dmg Debian7live.img
bash-3.2# diskutil list
/dev/disk4
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.8 GB disk4
1: DOS_FAT_32 UNTITLED 1 15.8 GB disk4s1
bash-3.2# diskutil unmountDisk /dev/disk4
Unmount of all volumes on disk4 was successful
bash-3.2# dd if=Debian7live.img of=/dev/disk4 bs=1m
538+0 records in
538+0 records out
564133888 bytes transferred in 105.770259 secs (5333578 bytes/sec)
bash-3.2# hdiutil eject /dev/disk4
"disk4" unmounted.
"disk4" ejected.
bash-3.2#
monitor ethernet activity with arpwatch
yum install arpwatch
arpwatch -i eth0
chkconfig arpwatch on
to send email notification edit the following file
vim /etc/sysconfig/arpwatch
OPTIONS="-u arpwatch -e [email protected] -s 'root (Arpwatch)'"
service arpwatch restart
how to flush iptables rules
ето как да ресетнем всичко въведено до момента
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables -t nat -X
iptables -t mangle -X
slackware package system
инсталиране на нов пакет “installpkg”
деинсталация на пакет “removepkg”
обновяване на вече съществуващ пакет “upgradepkg”