/l3/users/27-07-2009/nt-lnet/debian7.net.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 |
|
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]#
|
#[root@fbsd7:ipcalc]# ifconfig
[root@fbsd7:ipcalc]# /etc/netstart devd already running? (pid=703). lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.27 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:4e:00:00:07 ... re2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> ether 00:16:4e:00:02:07 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#[root@fbsd7:ipcalc]# route -n
![]() usage: route [-dnqtv] command [[modifiers] args] |
#[root@fbsd7:ipcalc]# /etc/rc.d/
[root@fbsd7:ipcalc]# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 287 re1 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#2 UC 0 0 re1 192.168.15.254 link#2 UHLW 2 116 re1 192.168.16 link#1 UC 0 0 re0 192.168.16.7 00:16:3e:00:00:07 UHLW 1 38 re0 1186 ... atm2 geli ldconfig nfsd root virecover atm3 geli2 local nfslocking route6d watchdogd auditd hcsecd localpkg nfsserver routed wpa_supplicant auto_linklocal hostapd lockd nisdomain routing ypbind bgfsck hostname lpd nsswitch rpcbind yppasswdd bluetooth ike mdconfig ntpd rtadvd ypserv bootparams inetd mdconfig2 ntpdate rwho ypset bridge initrandom mixer othermta savecore ypupdated bsnmpd ip6addrctl motd pccard sdpd ypxfrd bthidd ip6fw mountcritlocal pcvt securelevel |
#[root@fbsd7:ipcalc]# netstat -rn
[root@fbsd7:ipcalc]# /etc/rc.d/netif restart Stopping network: lo0 re0 re1 re2 plip0. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.27 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:4e:00:00:07 ... 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.16 link#1 UC 0 0 re0 192.168.16.7 00:16:3e:00:00:07 UHLW 1 20 re0 1196 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5::/32 fe80::1%lo0 UC lo0 ff02::%lo0/32 fe80::1%lo0 UC lo0 |
#[root@fbsd7:ipcalc]# /etc/rc.d/routed restart
[root@fbsd7:ipcalc]# /etc/rc.d/rout route6d routed routing |
#[root@fbsd7:ipcalc]# netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.16 link#1 UC 0 0 re0 192.168.16.7 00:16:3e:00:00:07 UHLW 1 70 re0 1177 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5::/32 fe80::1%lo0 UC lo0 ff02::%lo0/32 fe80::1%lo0 UC lo0 |
#[root@fbsd7:ipcalc]# /etc/rc.d/routed
![]() Usage: /etc/rc.d/routed [fast|force|one](start|stop|restart|rcvar|status|poll) |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]#
|
#[root@fbsd7:ipcalc]# /etc/rc.d/net
netif netoptions network_ipv6 |
#[root@fbsd7:ipcalc]# ifconfig
[root@fbsd7:ipcalc]# /etc/rc.d/netif restart Stopping network: lo0 re0 re1 re2 plip0. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.27 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:4e:00:00:07 ... re2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> ether 00:16:4e:00:02:07 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#[root@fbsd7:ipcalc]# netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.16 link#1 UC 0 0 re0 192.168.16.7 00:16:3e:00:00:07 UHLW 1 36 re0 1187 192.168.16.254 00:04:75:75:46:b1 UHLW 1 1 re0 1195 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5::/32 fe80::1%lo0 UC lo0 ff02::%lo0/32 fe80::1%lo0 UC lo0 |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]# sh /etc/rc.d/ro
![]() [root@fbsd7:ipcalc]# sh /etc/rc.d/ro root route6d routed routing root route6d routed routing |
#[root@fbsd7:ipcalc]# sh /etc/rc.d/route
![]() [root@fbsd7:ipcalc]# sh /etc/rc.d/route route6d routed route6d routed |
#[root@fbsd7:ipcalc]# sh /etc/rc.d/routed
![]() Usage: /etc/rc.d/routed [fast|force|one](start|stop|restart|rcvar|status|poll) |
#[root@fbsd7:ipcalc]# sh /etc/rc.d/routed restart
|
#[root@fbsd7:ipcalc]# netstat -rn -f inet
[root@fbsd7:ipcalc]# netstat -rn =f inet netstat: kvm not available: inet: No such file or directory Routing tables rt_tables: symbol not in namelist Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.16 link#1 UC 0 0 re0 192.168.16.7 00:16:3e:00:00:07 UHLW 1 162 re0 1140 192.168.16.254 00:04:75:75:46:b1 UHLW 1 3 re0 1189 |
#[root@fbsd7:ipcalc]# route add default 192.168.16.254
[root@fbsd7:ipcalc]# route add default gw 192.168.16.254 route: bad address: gw add net default: gateway 192.168.16.254 |
#[root@fbsd7:ipcalc]# make install
![]() [root@fbsd7:ipcalc]# netstat -rn -f inet Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.16.254 UGS 0 0 re0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.16 link#1 UC 0 0 re0 192.168.16.7 00:16:3e:00:00:07 UHLW 1 241 re0 1111 192.168.16.254 00:04:75:75:46:b1 UHLW 2 5 re0 1176 ===> Vulnerability check disabled, database not found => ipcalc-0.41.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch from http://jodies.de/ipcalc-archive/. ^C ^C |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]# ping ya.ru
![]() ^C |
#[root@fbsd7:ipcalc]# ping ya.ru
![]() [root@fbsd7:ipcalc]# ping 192.168.16.254 PING 192.168.16.254 (192.168.16.254): 56 data bytes 64 bytes from 192.168.16.254: icmp_seq=0 ttl=64 time=0.139 ms ^C --- 192.168.16.254 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.139/0.139/0.139/0.000 ms ^C |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]#
![]() |
#[root@fbsd7:ipcalc]# ping ya.ru
PING ya.ru (213.180.204.8): 56 data bytes 64 bytes from 213.180.204.8: icmp_seq=0 ttl=51 time=51.410 ms ^C --- ya.ru ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 51.410/51.410/51.410/0.000 ms |
#[root@fbsd7:ipcalc]# ipcalc 192.168.63.0/24 /28
===> Vulnerability check disabled, database not found => ipcalc-0.41.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch from http://jodies.de/ipcalc-archive/. ipcalc-0.41.tar.gz 100% of 21 kB 1650 kBps ===> Extracting for ipcalc-0.41 => MD5 Checksum OK for ipcalc-0.41.tar.gz. => SHA256 Checksum OK for ipcalc-0.41.tar.gz. ===> ipcalc-0.41 depends on file: /usr/local/bin/perl5.8.8 - found ===> Patching for ipcalc-0.41 ===> ipcalc-0.41 depends on file: /usr/local/bin/perl5.8.8 - found ... Hosts/Net: 14 Class C, Private Internet 16. Network: 192.168.63.240/28 11000000.10101000.00111111.1111 0000 HostMin: 192.168.63.241 11000000.10101000.00111111.1111 0001 HostMax: 192.168.63.254 11000000.10101000.00111111.1111 1110 Broadcast: 192.168.63.255 11000000.10101000.00111111.1111 1111 Hosts/Net: 14 Class C, Private Internet Subnets: 16 Hosts: 224 õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root |
$dmesg | less
|
$lsmod | less
|
$sudo mii-tool
![]() Password: SIOCGMIIPHY on 'eth0' failed: Operation not supported SIOCGMIIPHY on 'eth1' failed: Operation not supported SIOCGMIIPHY on 'eth2' failed: Operation not supported no MII interfaces found |
$sudo apt-get install ethtool
Чтение списков пакетов... Готово Построение дерева зависимостей... Готово НОВЫЕ пакеты, которые будут установлены: ethtool обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 63 пакетов не обновлено. Необходимо скачать 51,2kБ архивов. После распаковки объем занятого дискового пространства возрастёт на 172kB. ВНИМАНИЕ: Следующие пакеты невозможно аутентифицировать! ethtool Установить эти пакеты без проверки [y/N]? y Получено:1 http://debian.org.ua etch/main ethtool 5-1 [51,2kB] Получено 51,2kB за 0s (139kB/c) Выбор ранее не выбранного пакета ethtool. (Чтение базы данных... на данный момент установлено 27148 файлов и каталогов.) Распаковывается пакет ethtool (из файла .../archives/ethtool_5-1_i386.deb)... Настраивается пакет ethtool (5-1) ... |
$sudo ethtool
![]() ethtool: bad command line argument(s) For more information run ethtool -h |
$sudo ethtool eth0
Settings for eth0: Link detected: yes |
$sudo ethtool eth1
Settings for eth1: Link detected: yes |
$sudo ethtool eth2
Settings for eth2: Link detected: yes |
$grep -r eth
![]() |
$grep -r eth\* /etc
![]() /etc/X11/app-defaults/Xman: <Btn1Down>,<Btn1Up>: Search(Apropos) reset() /etc/X11/app-defaults/Xman: <Btn1Down>,<Btn1Up>: Search(Cancel) reset() /etc/X11/app-defaults/Xman: <Key>Return: Search(Manpage) \n\ /etc/X11/app-defaults/Xman: <Btn1Down>,<Btn1Up>: Search(Manpage, Open) reset() /etc/X11/app-defaults/Xman: <Btn1Down>,<Btn1Up>: Search(Apropos, Open) reset() /etc/X11/app-defaults/Xman: <Btn1Down>,<Btn1Up>: Search(Cancel, Open) reset() /etc/X11/app-defaults/Xman: <Key>Return: Search(Manpage, Open) \n\ /etc/X11/app-defaults/Xman: <Btn1Down>,<Btn1Up>: SaveFormattedPage(Save) reset() \n\ /etc/X11/app-defaults/Xman: <Btn1Down>,<Btn1Up>: SaveFormattedPage(Cancel) reset() \n\ /etc/X11/app-defaults/Xman: <Btn1Down>,<Btn1Up>: PopupHelp() reset() ... /etc/X11/app-defaults/XMore: <Key>Return: scroll-one-line-up()\n\ /etc/X11/app-defaults/XMore:*printdialogshell*geometry: 600x120 /etc/X11/app-defaults/XMore:*printdialogshell*main*setup.fromHoriz: ok /etc/X11/app-defaults/XMore:*printdialogshell*main*setup.fromVert: innerform /etc/X11/app-defaults/XMore:*printdialogshell*main*setup.label: Setup... /etc/X11/app-defaults/XMore:*printdialogshell*main*setup.tip: Configure print job options (page size, orientation, etc.) /etc/X11/app-defaults/XMore:*printdialogshell*main*cancel.fromHoriz: setup /etc/X11/app-defaults/XMore:*printdialogshell*setup*geometry: 600x400 /etc/X11/app-defaults/XMore:*printdialogshell*setup*title: Print: Print job options /etc/X11/app-defaults/XMore:*printdialogshell*setup*ok.fromVert: list |
$grep -r eth0
![]() grep: /etc/X11/Xwrapper.config: Permission denied grep: /etc/apt/trusted.gpg~: Permission denied grep: /etc/apt/trustdb.gpg: Permission denied grep: /etc/apt/trusted.gpg: Permission denied grep: /etc/apt/secring.gpg: Permission denied grep: /etc/ssh/ssh_host_dsa_key: Permission denied grep: /etc/ssh/ssh_host_rsa_key: Permission denied grep: /etc/ssl/private: Permission denied /etc/dhcp3/dhclient.conf:# interface "eth0"; /etc/dhcp3/dhclient.conf:# interface "eth0"; grep: /etc/shadow-: Permission denied grep: /etc/gshadow-: Permission denied grep: /etc/sudoers: Permission denied grep: /etc/group-: Permission denied /etc/network/run/ifstate:eth0=eth0 /etc/network/interfaces:auto lo eth0 eth1 /etc/network/interfaces:iface eth0 inet static grep: /etc/.pwd.lock: Permission denied grep: /etc/shadow: Permission denied grep: /etc/gshadow: Permission denied |
$sudo
/etc/dhcp3/dhclient.conf:# interface "eth0"; /etc/dhcp3/dhclient.conf:# interface "eth0"; /etc/network/run/ifstate:eth0=eth0 /etc/network/interfaces:auto lo eth0 eth1 /etc/network/interfaces:iface eth0 inet static |
$/sbin/
[user@debian7:~]$ ifconfig bash: ifconfig: command not found eth0 Link encap:Ethernet HWaddr 00:16:3E:00:00:07 inet addr:192.168.16.7 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:238597 errors:0 dropped:0 overruns:0 frame:0 TX packets:264315 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:152221609 (145.1 MiB) TX bytes:93425595 (89.0 MiB) ... collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:468 (468.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
$/sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:16:3E:00:00:07 inet addr:192.168.16.7 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:238811 errors:0 dropped:0 overruns:0 frame:0 TX packets:264576 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:152236398 (145.1 MiB) TX bytes:93485904 (89.1 MiB) eth1 Link encap:Ethernet HWaddr 00:16:3E:11:11:07 inet6 addr: fe80::216:3eff:fe11:1107/64 Scope:Link ... RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
$ifconfig eth1 192.168.14.55
![]() bash: ifconfig: command not found |
$sudo
|
$/sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3E:00:00:07 inet addr:192.168.16.7 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:240244 errors:0 dropped:0 overruns:0 frame:0 TX packets:266335 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:152333717 (145.2 MiB) TX bytes:93943327 (89.5 MiB) eth1 Link encap:Ethernet HWaddr 00:16:3E:11:11:07 inet addr:192.168.14.55 Bcast:192.168.14.255 Mask:255.255.255.0 ... collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:510 (510.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
$sudo /etc/init.d/networking restart
Reconfiguring network interfaces...Don't seem to be have all the variables for eth1/inet. Failed to bring up eth1. done. |
$/sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3E:00:00:07 inet addr:192.168.16.7 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:135 errors:0 dropped:0 overruns:0 frame:0 TX packets:156 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11716 (11.4 KiB) TX bytes:27384 (26.7 KiB) eth1 Link encap:Ethernet HWaddr 00:16:3E:11:11:07 inet addr:192.168.14.55 Bcast:192.168.14.255 Mask:255.255.255.0 ... collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:510 (510.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
$sudo /etc/network/interfaces
![]() sudo: /etc/network/interfaces: command not found |
$sudo vim /etc/network/interfaces
|
$sudo /etc/init.d/networking restart
Reconfiguring network interfaces...done. |
$sudo vim /etc/network/interfaces
|
$man interfaces
|
$ssh 192.168.16.27
The authenticity of host '192.168.16.27 (192.168.16.27)' can't be established. DSA key fingerprint is 13:3f:fb:2a:53:62:8e:f8:0e:c7:3a:c9:10:99:b6:25. Are you sure you want to continue connecting (yes/no)? yes Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts). Password: Last login: Mon Jul 27 22:22:50 2009 Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008 Welcome to FreeBSD! ... http://www.FreeBSD.org/search/. If the doc distribution has been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. Removing stale pidfile |
#[user@fbsd7:~]$
![]() [user@fbsd7:~]$ |
#[user@fbsd7:~]$
![]() |
#[user@fbsd7:~]$ ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.27 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:3e:44:00:07 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#[user@fbsd7:~]$ man -a re
RE(4) FreeBSD Kernel Interfaces Manual RE(4) [user@fbsd7:~]$ man re re(3) Perl Programmers Reference Guide re(3) NAME re - Perl pragma to alter regular expression behaviour SYNOPSIS use re 'taint'; ($x) = ($^X =~ /^(.*)$/s); # $x is tainted here $pat = '(?{ $foo = 1 })'; use re 'eval'; ... NICs based on the 8139C+ and 8101E are capable of 10 and 100Mbps speeds over CAT5 cable. NICs based on the 8169, 816xS and 811xS are capable of 10, 100 and 1000Mbps operation. All NICs supported by the re driver have TCP/IP checksum offload and hardware VLAN tagging/insertion features, and use a descriptor-based DMA mechanism. They are also capable of TCP large send (TCP segmentation offload). The 8139C+ is a single-chip solution combining both a 10/100 MAC and PHY. The 8169 is a 10/100/1000 MAC only, requiring a GMII or TBI external PHY. The 8169S and 8110S are single-chip devices containing both a 10/100/1000 |
#[user@fbsd7:~]$ ssh 192.168.16.254
![]() [user@fbsd7:~]$ ifconfig -a re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 192.168.16.27 netmask 0xffffff00 broadcast 192.168.16.255 ether 00:16:3e:44:00:07 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 The authenticity of host '192.168.16.254 (192.168.16.254)' can't be established. DSA key fingerprint is 83:c6:70:6f:8a:7e:8b:e9:e4:53:26:31:28:d6:dc:f0. Are you sure you want to continue connecting (yes/no)? Host key verification failed. |
#[user@fbsd7:~]$ ssh-keygen -R 192.168.16.254
![]() fopen: No such file or directory |
$ssh 192.168.16.27
![]() ssh: connect to host 192.168.16.27 port 22: No route to host |
$pinmg 192.168.16.27
![]() bash: pinmg: command not found |
$ping 192.168.16.22
[user@debian7:~]$ pin PING 192.168.16.27 (192.168.16.27) 56(84) bytes of data. From 192.168.16.7 icmp_seq=1 Destination Host Unreachable From 192.168.16.7 icmp_seq=2 Destination Host Unreachable From 192.168.16.7 icmp_seq=3 Destination Host Unreachable From 192.168.16.7 icmp_seq=5 Destination Host Unreachable From 192.168.16.7 icmp_seq=6 Destination Host Unreachable From 192.168.16.7 icmp_seq=7 Destination Host Unreachable From 192.168.16.7 icmp_seq=9 Destination Host Unreachable From 192.168.16.7 icmp_seq=10 Destination Host Unreachable From 192.168.16.7 icmp_seq=11 Destination Host Unreachable --- 192.168.16.27 ping statistics --- 14 packets transmitted, 0 received, +9 errors, 100% packet loss, time 13000ms , pipe 3 PING 192.168.16.22 (192.168.16.22) 56(84) bytes of data. 64 bytes from 192.168.16.22: icmp_seq=1 ttl=64 time=1.48 ms --- 192.168.16.22 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.480/1.480/1.480/0.000 ms |
$ping 192.168.16.23
![]() PING 192.168.16.23 (192.168.16.23) 56(84) bytes of data. --- 192.168.16.23 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
$ping 192.168.16.24
PING 192.168.16.24 (192.168.16.24) 56(84) bytes of data. 64 bytes from 192.168.16.24: icmp_seq=1 ttl=64 time=1.59 ms --- 192.168.16.24 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.591/1.591/1.591/0.000 ms |
$ping 192.168.16.26
[user@debian7:~]$ ping 192.168.16.25 PING 192.168.16.25 (192.168.16.25) 56(84) bytes of data. 64 bytes from 192.168.16.25: icmp_seq=1 ttl=64 time=10.1 ms --- 192.168.16.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 10.188/10.188/10.188/0.000 ms PING 192.168.16.26 (192.168.16.26) 56(84) bytes of data. 64 bytes from 192.168.16.26: icmp_seq=1 ttl=64 time=1.59 ms --- 192.168.16.26 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.590/1.590/1.590/0.000 ms |
$ping 192.168.16.27
![]() PING 192.168.16.27 (192.168.16.27) 56(84) bytes of data. From 192.168.16.7 icmp_seq=1 Destination Host Unreachable From 192.168.16.7 icmp_seq=2 Destination Host Unreachable From 192.168.16.7 icmp_seq=3 Destination Host Unreachable From 192.168.16.7 icmp_seq=4 Destination Host Unreachable From 192.168.16.7 icmp_seq=5 Destination Host Unreachable From 192.168.16.7 icmp_seq=6 Destination Host Unreachable --- 192.168.16.27 ping statistics --- 7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6010ms , pipe 3 |
$ping 192.168.16.254
PING 192.168.16.254 (192.168.16.254) 56(84) bytes of data. 64 bytes from 192.168.16.254: icmp_seq=1 ttl=64 time=0.559 ms ^X^[[A64 bytes from 192.168.16.254: icmp_seq=2 ttl=64 time=0.051 ms ^[[A64 bytes from 192.168.16.254: icmp_seq=3 ttl=64 time=0.069 ms --- 192.168.16.254 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1998ms rtt min/avg/max/mdev = 0.051/0.226/0.559/0.235 ms |
$ping 192.168.16.254
user@debian:~$ exit logout Connection to 192.168.16.254 closed. PING 192.168.16.254 (192.168.16.254) 56(84) bytes of data. 64 bytes from 192.168.16.254: icmp_seq=1 ttl=64 time=0.940 ms ^X --- 192.168.16.254 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.940/0.940/0.940/0.000 ms |
$ping 192.168.16.26
[user@debian7:~]$ ping 192.168.16.27 PING 192.168.16.27 (192.168.16.27) 56(84) bytes of data. From 192.168.16.7 icmp_seq=1 Destination Host Unreachable From 192.168.16.7 icmp_seq=2 Destination Host Unreachable From 192.168.16.7 icmp_seq=3 Destination Host Unreachable From 192.168.16.7 icmp_seq=4 Destination Host Unreachable From 192.168.16.7 icmp_seq=5 Destination Host Unreachable From 192.168.16.7 icmp_seq=6 Destination Host Unreachable From 192.168.16.7 icmp_seq=7 Destination Host Unreachable From 192.168.16.7 icmp_seq=8 Destination Host Unreachable ... From 192.168.16.7 icmp_seq=35 Destination Host Unreachable From 192.168.16.7 icmp_seq=36 Destination Host Unreachable --- 192.168.16.27 ping statistics --- 38 packets transmitted, 0 received, +36 errors, 100% packet loss, time 37082ms , pipe 3 PING 192.168.16.26 (192.168.16.26) 56(84) bytes of data. 64 bytes from 192.168.16.26: icmp_seq=1 ttl=64 time=1.42 ms --- 192.168.16.26 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.421/1.421/1.421/0.000 ms |
$ssh 192.168.16.27
[user@debian7:~]$ ping 192.168.16.27 PING 192.168.16.27 (192.168.16.27) 56(84) bytes of data. 64 bytes from 192.168.16.27: icmp_seq=1 ttl=64 time=0.695 ms --- 192.168.16.27 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.695/0.695/0.695/0.000 ms The authenticity of host '192.168.16.27 (192.168.16.27)' can't be established. DSA key fingerprint is 13:3f:fb:2a:53:62:8e:f8:0e:c7:3a:c9:10:99:b6:25. Are you sure you want to continue connecting (yes/no)? yes Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts). ... along with the mailing lists, can be searched by going to http://www.FreeBSD.org/search/. If the doc distribution has been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. |
$sudo netstat -rn
[user@fbsd7:~]$ exit exit Connection to 192.168.16.27 closed. Password: Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 172.16.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.16.254 0.0.0.0 UG 0 0 0 eth0 |
$sudo netstat -r
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 172.16.0.0 * 255.255.255.0 U 0 0 0 eth1 192.168.16.0 * 255.255.255.0 U 0 0 0 eth0 default debian.net.nt 0.0.0.0 UG 0 0 0 eth0 |
$ping 192.168.15.254
![]() PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. --- 192.168.15.254 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2008ms |
$sudo route add -net 192.168.16.0 netmask 255.255.255.0 gw 10.0.35.1
![]() SIOCADDRT: Network is unreachable |
$sudo route add -net 192.168.15
![]() SIOCADDRT: Network is unreachable |
$ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. 64 bytes from 10.0.35.1: icmp_seq=1 ttl=63 time=0.332 ms --- 10.0.35.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.332/0.332/0.332/0.000 ms |
$ssh 192.168.16.254
![]() user@debian:~$ exit logout Connection to 192.168.16.254 closed. |
$sudo apt-get install ipcalc
Password: Чтение списков пакетов... Готово Построение дерева зависимостей... Готово НОВЫЕ пакеты, которые будут установлены: ipcalc обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 63 пакетов не обновлено. Необходимо скачать 26,4kБ архивов. После распаковки объем занятого дискового пространства возрастёт на 131kB. ВНИМАНИЕ: Следующие пакеты невозможно аутентифицировать! ipcalc Установить эти пакеты без проверки [y/N]? y Получено:1 http://debian.org.ua etch/main ipcalc 0.41-1 [26,4kB] Получено 26,4kB за 0s (465kB/c) Выбор ранее не выбранного пакета ipcalc. (Чтение базы данных... на данный момент установлено 27158 файлов и каталогов.) Распаковывается пакет ipcalc (из файла .../archives/ipcalc_0.41-1_all.deb)... Настраивается пакет ipcalc (0.41-1) ... |
$ipcalc 192.168.63.0/24 /28 | less
|
$apt-cache search ipcalc
ipcalc - parameter calculator for IPv4 addresses sipcalc - Advanced console-based ip subnet calculator |
$ssh 192.168.16.27
The authenticity of host '192.168.16.27 (192.168.16.27)' can't be established. DSA key fingerprint is 13:3f:fb:2a:53:62:8e:f8:0e:c7:3a:c9:10:99:b6:25. Are you sure you want to continue connecting (yes/no)? yes Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts). Password: Last login: Wed Jul 29 15:44:52 2009 from 192.168.16.7 Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008 Welcome to FreeBSD! ... http://www.FreeBSD.org/search/. If the doc distribution has been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. Removing stale pidfile |
Время первой команды журнала | 16:15:03 2009- 7-29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 19:12:53 2009- 7-29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 16.83 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.85 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008