/l3/trainings/nt-bsdnet/2006-04-03/fbsd2.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
#l3-agent
l3-agent is already running: pid=968; pidfile=/root/.lilalo/l3-agent.pid |
#l3-agent
l3-agent is already running: pid=968; pidfile=/root/.lilalo/l3-agent.pid |
#l3-agent
exit l3-agent is already running: pid=968; pidfile=/root/.lilalo/l3-agent.pid |
#ps aux | grep l3-agent
exit root 968 0.0 0.7 8272 6952 ?? Ss 8:12AM 0:00.46 l3-agent (perl5.8.7) |
#kill 968
|
#l3-agent
|
#ps aux | grep l3-agent
X Window System Version 6.8.2 Release Date: 9 February 2005 X Protocol Version 11, Revision 0, Release 6.8.2 Build Operating System: FreeBSD 6.0 i386 [ELF] Current Operating System: FreeBSD fbsd2.unix.nt 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Apr 3 14:33:41 EEST 2006 root@fbsd2.unix.nt:/usr/src/sys/i386/compile/MAIN i386 Build Date: 12 October 2005 Before reporting problems, check http://wiki.X.Org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, ... (==) Log file: "/var/log/Xorg.0.log", Time: Fri Apr 7 08:59:29 2006 (==) Using config file: "/etc/X11/xorg.conf" [drm] failed to load kernel module "i915" (EE) I810(0): [dri] DRIScreenInit failed. Disabling DRI. SESSION_MANAGER=local/fbsd2.unix.nt:/tmp/.ICE-unix/801 ** (gnome-panel:858): WARNING **: Failed to add file monitor for file:///root/.gtk-bookmarks: ïÐÅÒÁÃÉÑ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ (Gecko:905): Gdk-WARNING **: gdk_property_get(): length value has wrapped in calculation (did you pass G_MAXLONG?) exit exit root 1102 1.9 0.7 8256 6936 ?? Ss 8:13AM 0:00.21 l3-agent (perl5.8.7) |
#cd /usr/ports/security/sudo
|
#make
configure: creating libtool checking path to sudo_noexec.so... ${exec_prefix}/libexec/sudo_noexec.so checking for uname... uname checking for tr... tr checking for nroff... nroff checking whether cc needs -traditional... no checking for an ANSI C-conforming const... yes checking for working volatile... yes checking for bison... no checking for byacc... byacc ... cc -o sudo check.o env.o getspwuid.o gettime.o goodpath.o fileops.o find_path.o interfaces.o logging.o parse.o set_perms.o sudo.o sudo_edit.o tgetpass.o zero_bytes.o sudo_auth.o pam.o sudo.tab.o lex.yy.o alloc.o defaults.o closefrom.o -lutil -lpam -lopie cc -c -I. -I. -O2 -fno-strict-aliasing -pipe -D_PATH_SUDOERS=\"/usr/local/etc/sudoers\" -D_PATH_SUDOERS_TMP=\"/usr/local/etc/sudoers.tmp\" -DSUDOERS_UID=0 -DSUDOERS_GID=0 -DSUDOERS_MODE=0440 visudo.c cc -o visudo visudo.o fileops.o gettime.o goodpath.o find_path.o sudo.tab.o lex.yy.o alloc.o defaults.o closefrom.o /bin/sh ./libtool --mode=compile cc -c -I. -I. -O2 -fno-strict-aliasing -pipe -D_PATH_SUDOERS=\"/usr/local/etc/sudoers\" -D_PATH_SUDOERS_TMP=\"/usr/local/etc/sudoers.tmp\" -DSUDOERS_UID=0 -DSUDOERS_GID=0 -DSUDOERS_MODE=0440 sudo_noexec.c mkdir .libs cc -c -I. -I. -O2 -fno-strict-aliasing -pipe -D_PATH_SUDOERS=\"/usr/local/etc/sudoers\" -D_PATH_SUDOERS_TMP=\"/usr/local/etc/sudoers.tmp\" -DSUDOERS_UID=0 -DSUDOERS_GID=0 -DSUDOERS_MODE=0440 sudo_noexec.c -fPIC -DPIC -o .libs/sudo_noexec.o /bin/sh ./libtool --mode=link cc -o sudo_noexec.la sudo_noexec.lo -avoid-version -rpath /usr/local/libexec cc -shared .libs/sudo_noexec.o -Wl,-soname -Wl,sudo_noexec.so -o .libs/sudo_noexec.so creating sudo_noexec.la (cd .libs && rm -f sudo_noexec.la && ln -s ../sudo_noexec.la sudo_noexec.la) |
#make install
===> Installing for sudo-1.6.8.9 ===> Generating temporary packing list ===> Checking if security/sudo already installed /bin/sh ./mkinstalldirs /usr/local/bin /usr/local/sbin /usr/local/etc /usr/local/man/man8 /usr/local/man/man5 /usr/local/libexec /bin/sh ./install-sh -c -O 0 -G 0 -M 4111 -s sudo /usr/local/bin/sudo rm -f /usr/local/bin/sudoedit ln /usr/local/bin/sudo /usr/local/bin/sudoedit /bin/sh ./install-sh -c -O 0 -G 0 -M 0111 -s visudo /usr/local/sbin/visudo /bin/sh ./libtool --mode=install /bin/sh ./install-sh -c sudo_noexec.la /usr/local/libexec /bin/sh ./install-sh -c .libs/sudo_noexec.so /usr/local/libexec/sudo_noexec.so ... increased privileges. /usr/local/bin/sudo /usr/local/bin/sudoedit If there are vulnerabilities in these programs there may be a security risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern. For more information, and contact details about the security status of this software, see the following webpage: http://www.courtesan.com/sudo/ |
#pkg_info -Lx sudo
Information for sudo-1.6.8.9: Files: /usr/local/man/man5/sudoers.5.gz /usr/local/man/man8/sudo.8.gz /usr/local/man/man8/visudo.8.gz /usr/local/man/man8/sudoedit.8.gz /usr/local/bin/sudo /usr/local/bin/sudoedit /usr/local/etc/sudoers.sample /usr/local/libexec/sudo_noexec.so /usr/local/sbin/visudo |
#pkg_info -Lx sudo | grep /etc
/usr/local/etc/sudoers.sample |
#tail /var/log/messages
Apr 3 07:55:28 fbsd2 sshd[603]: error: PAM: authentication error for root from linux.nt Apr 3 07:55:29 fbsd2 sshd[607]: error: PAM: authentication error for root from linux.nt Apr 3 08:52:10 fbsd2 login: pam_authenticate(): conversation failure Apr 3 08:57:10 fbsd2 login: 1 LOGIN FAILURE ON ttyv0 Apr 3 09:05:16 fbsd2 su: user to root on /dev/ttyp0 Apr 3 09:05:42 fbsd2 kernel: xl1: link state changed to DOWN Apr 3 09:14:07 fbsd2 su: BAD SU user to root on /dev/ttyp0 Apr 3 09:14:17 fbsd2 su: user to root on /dev/ttyp0 Apr 3 09:23:27 fbsd2 su: user to root on /dev/ttyp0 Apr 3 09:26:49 fbsd2 sudo: user : TTY=ttyp0 ; PWD=/usr/local/etc ; USER=root ; COMMAND=/bin/cat /etc/master.passwd |
#cd /usr/local/etc
|
#vi sudoers
65a66 > user ALL = (ALL) ALL |
#ifconfig
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.15.22 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> ether 00:04:76:a0:a9:12 media: Ethernet autoselect (none) status: no carrier plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 |
#man xl
|
#whatis xl
xl(4) - 3Com Etherlink XL and Fast Etherlink XL Ethernet device driver |
#apropos intel | grep driver
dc(4) - DEC/Intel 21143 and clone 10/100 Ethernet driver digi(4) - DigiBoard intelligent serial cards driver em(4) - Intel(R) PRO/1000 Gigabit Ethernet adapter driver ex(4) - Ethernet device driver for the Intel EtherExpress Pro/10 and Pro/10+ fxp(4) - Intel EtherExpress PRO/100 Ethernet device driver ichsmb(4) - Intel ICH SMBus controller driver ichwd(4) - Intel ICH watchdog timer driver iir(4) - Intel Integrated RAID controller and ICP Vortex driver intpm(4) - Intel PIIX4 Power Management controller driver ipw(4) - Intel PRO/Wireless 2100 IEEE 802.11 driver iwi(4) - Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 driver ixgb(4) - Intel(R) PRO/10GbE Ethernet driver for the FreeBSD operating system rp(4) - driver for Comtrol RocketPort Intelligent Serial Port Cards si(4) - driver for Specialix International SI/XIO or SX intelligent serial card snd_ich(4) - Intel ICH PCI and compatible bridge device driver |
#apropos user | grep remove
pw(8) - create, remove, modify & display system users and groups rmuser(8) - remove users from the system |
#apropos copy | grep file
cp(1) - copy files cpio(1) - copy files to and from archives dd(1) - convert and copy a file krb5_kt_ops(3), krb5_keytab_entry(3), krb5_kt_cursor(3), krb5_kt_add_entry(3), krb5_kt_close(3), krb5_kt_compare(3), krb5_kt_copy_entry_contents(3), krb5_kt_default(3), krb5_kt_default_name(3), krb5_kt_end_seq_get(3), krb5_kt_free_entry(3), krb5_kt_get_entry(3), krb5_kt_get_name(3), krb5_kt_get_type(3), krb5_kt_next_entry(3), krb5_kt_read_service_key(3), krb5_kt_register(3), krb5_kt_remove_entry(3 objcopy(1) - copy and translate object files pax(1) - read and write file archives and copy directory hierarchies rcp(1) - remote file copy scp(1) - secure copy (remote file copy program) |
#whatis intro
intro(1) - introduction to general commands (tools and utilities) intro(2) - introduction to system calls and error numbers intro(3) - introduction to the C libraries intro(4) - introduction to devices and device drivers intro(5) - introduction to file formats intro(6) - introduction to games intro(7) - miscellaneous information pages intro(8) - introduction to system maintenance and operation commands intro(9) - introduction to system kernel interfaces |
#!if
ifconfig xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.15.22 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> ether 00:04:76:a0:a9:12 media: Ethernet autoselect (none) status: no carrier plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 |
#whereis mc
mc: /usr/ports/misc/mc |
#cd /usr/ports/misc/mc
|
#make
checking for rdchk... no checking for getgrnam... yes checking for pathconf... yes checking for setpriv... no checking for setgidx... no checking for setuidx... no checking for setgroups... yes checking for mktime... yes checking for rename... yes checking for ftruncate... yes ... 958 translated messages. rm -f sk.gmo && /usr/local/bin/msgfmt -c --statistics -o sk.gmo sk.po 958 translated messages. rm -f sl.gmo && /usr/local/bin/msgfmt -c --statistics -o sl.gmo sl.po 958 translated messages. rm -f sv.gmo && /usr/local/bin/msgfmt -c --statistics -o sv.gmo sv.po 958 translated messages. rm -f uk.gmo && /usr/local/bin/msgfmt -c --statistics -o uk.gmo uk.po 958 translated messages. rm -f ta.gmo && /usr/local/bin/msgfmt -c --statistics -o ta.gmo ta.po |
#make install
install -o root -g wheel -m 444 xterm.ad /usr/local/share/mc/term/xterm.ad install -o root -g wheel -m 444 xterm.ti /usr/local/share/mc/term/xterm.ti install -o root -g wheel -m 444 ansi.ti /usr/local/share/mc/term/ansi.ti install -o root -g wheel -m 444 vt100.ti /usr/local/share/mc/term/vt100.ti install -o root -g wheel -m 444 xterm.tcap /usr/local/share/mc/term/xterm.tcap gmake[2]: Leaving directory `/usr/ports/misc/mc/work/mc-4.6.0/lib' gmake[1]: Leaving directory `/usr/ports/misc/mc/work/mc-4.6.0/lib' Making install in doc gmake[1]: Entering directory `/usr/ports/misc/mc/work/mc-4.6.0/doc' Making install in es ... This port has installed the following files which may act as network servers and may therefore pose a remote security risk to the system. /usr/local/bin/mc If there are vulnerabilities in these programs there may be a security risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern. For more information, and contact details about the security status of this software, see the following webpage: http://www.ibiblio.org/mc/ |
#mc
|
#mc
|
#make
===> Vulnerability check disabled, database not found => deco39.tgz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch from http://heanet.dl.sourceforge.net/sourceforge/deco/. deco39.tgz 100% of 102 kB 78 kBps ===> Extracting for deco-3.9_3 => Checksum OK for deco39.tgz. ===> Patching for deco-3.9_3 ===> Applying FreeBSD patches for deco-3.9_3 ===> Configuring for deco-3.9_3 creating cache ./config.cache ... cc -O2 -fno-strict-aliasing -pipe -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMCAP_H=1 -DHAVE_ST_RDEV=1 -DSTDC_HEADERS=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETGROUPS=1 -DHAVE_OPENDIR=1 -DHAVE_MEMCPY=1 -DHAVE_STRTOL=1 -DHAVE_TCGETATTR=1 -DHAVE_TCSETPGRP=1 cc -O2 -fno-strict-aliasing -pipe -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMCAP_H=1 -DHAVE_ST_RDEV=1 -DSTDC_HEADERS=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETGROUPS=1 -DHAVE_OPENDIR=1 -DHAVE_MEMCPY=1 -DHAVE_STRTOL=1 -DHAVE_TCGETATTR=1 -DHAVE_TCSETPGRP=1 cc -O2 -fno-strict-aliasing -pipe -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMCAP_H=1 -DHAVE_ST_RDEV=1 -DSTDC_HEADERS=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETGROUPS=1 -DHAVE_OPENDIR=1 -DHAVE_MEMCPY=1 -DHAVE_STRTOL=1 -DHAVE_TCGETATTR=1 -DHAVE_TCSETPGRP=1 cc -O2 -fno-strict-aliasing -pipe -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMCAP_H=1 -DHAVE_ST_RDEV=1 -DSTDC_HEADERS=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETGROUPS=1 -DHAVE_OPENDIR=1 -DHAVE_MEMCPY=1 -DHAVE_STRTOL=1 -DHAVE_TCGETATTR=1 -DHAVE_TCSETPGRP=1 cc -O2 -fno-strict-aliasing -pipe -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMCAP_H=1 -DHAVE_ST_RDEV=1 -DSTDC_HEADERS=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETGROUPS=1 -DHAVE_OPENDIR=1 -DHAVE_MEMCPY=1 -DHAVE_STRTOL=1 -DHAVE_TCGETATTR=1 -DHAVE_TCSETPGRP=1 cc -O2 -fno-strict-aliasing -pipe -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMCAP_H=1 -DHAVE_ST_RDEV=1 -DSTDC_HEADERS=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETGROUPS=1 -DHAVE_OPENDIR=1 -DHAVE_MEMCPY=1 -DHAVE_STRTOL=1 -DHAVE_TCGETATTR=1 -DHAVE_TCSETPGRP=1 ut.c: In function `timestr': ut.c:29: warning: passing arg 1 of `localtime' from incompatible pointer type cc -O2 -fno-strict-aliasing -pipe -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMCAP_H=1 -DHAVE_ST_RDEV=1 -DSTDC_HEADERS=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETGROUPS=1 -DHAVE_OPENDIR=1 -DHAVE_MEMCPY=1 -DHAVE_STRTOL=1 -DHAVE_TCGETATTR=1 -DHAVE_TCSETPGRP=1 cc cap.o choice.o cmd.o com.o dir.o draw.o edit.o env.o ex.o help.o hexview.o key.o main.o menu.o mh.o pw.o rec.o run.o scr.o tty.o ut.o view.o -ltermcap -o deco |
#make install
===> Installing for deco-3.9_3 ===> Generating temporary packing list ===> Checking if misc/deco already installed mkdir /usr/local/share/deco mkdir /usr/local/share/deco/help install -o root -g wheel -m 444 menu /usr/local/share/deco/menu install -o root -g wheel -m 444 profile /usr/local/share/deco/profile install -s -o root -g wheel -m 555 deco /usr/local/bin cd help; for f in *.general *.edit *.view *.hexview; do install -o root -g wheel -m 444 $f /usr/local/share/deco/help/$f; done install -o root -g wheel -m 444 ref.man /usr/local/man/man1/deco.1 install -o root -g wheel -m 444 cyrref.man /usr/local/man/ru.KOI8-R/man1/deco.1 ===> Compressing manual pages for deco-3.9_3 ===> Registering installation for deco-3.9_3 |
#deco
Demos Commander, Copyright (C) 1989-1997 Serge Vakulenko |
#less /etc/rc.conf
|
#/etc/rc.d/netif restart && /etc/rc.d/routing restart
![]() Tak mozhno perezapustit nastroiku IP-adresov i marshrutizacii |
#uptime
10:41AM up 17 mins, 2 users, load averages: 0.00, 0.01, 0.01 |
#vi /etc/rc.conf
|
#vi /etc/rc.conf
|
#/etc/rc.d/netif restart
Stopping network: lo0 xl0. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.15.22 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 tentative scopeid 0x2 inet 192.168.22.2 netmask 0xffffff00 broadcast 192.168.22.255 ether 00:04:76:a0:a9:12 media: Ethernet autoselect (none) status: no carrier |
#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.15 link#1 UC 0 0 xl0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 1 117 xl0 1174 192.168.22 link#2 UC 0 0 xl1 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%xl0/64 link#1 UC xl0 fe80::20a:5eff:fe05:3692%xl0 00:0a:5e:05:36:92 UHL lo0 fe80::%xl1/64 link#2 UC xl1 fe80::204:76ff:fea0:a912%xl1 00:04:76:a0:a9:12 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#4 UHL lo0 ff01::/32 ::1 U lo0 ff02::%xl0/32 link#1 UC xl0 ff02::%xl1/32 link#2 UC xl1 ff02::%lo0/32 ::1 UC lo0 |
#netstat -rn
System shutdown time has arrived exit Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 xl0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 1 37 xl0 1197 192.168.22 link#2 UC 0 0 xl1 Internet6: ... fe80::%xl0/64 link#1 UC xl0 fe80::20a:5eff:fe05:3692%xl0 00:0a:5e:05:36:92 UHL lo0 fe80::%xl1/64 link#2 UC xl1 fe80::204:76ff:fea0:a912%xl1 00:04:76:a0:a9:12 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#4 UHL lo0 ff01::/32 ::1 U lo0 ff02::%xl0/32 link#1 UC xl0 ff02::%xl1/32 link#2 UC xl1 ff02::%lo0/32 ::1 UC lo0 |
#netstat -rn -A inet
Routing tables Internet: Address Destination Gateway Flags Refs Use Netif Expire c240e84c (32) c26278dc : c2627858 c26278dc (33) c240e834 : c26278c4 c240e834 (root node) c26278c4 127.0.0.1 127.0.0.1 UH 0 0 lo0 c2627858 (34) c2627648 : c240e864 c2627648 (51) c26275c4 : c2627630 c26275c4 (56) c2627840 : c26275ac mk = c256d650 {(56), <normal>, (255) ffff ffff ff } ... mask (255) ffff ffff ffff ffff ffff c2627b70 (93) c2627750 : c2627e70 c2627750 (94) c2627b58 : c2627738 c2627b58 ff02::%xl0/32 link#1 UC xl0 mask (255) ffff ffff ffff ffff ffff c2627738 ff02::%xl1/32 link#2 UC xl1 mask (255) ffff ffff ffff ffff ffff c2627e70 ff02::%lo0/32 ::1 UC lo0 mask (255) ffff ffff ffff ffff ffff c240e764 (root node) |
#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.15 link#1 UC 0 0 xl0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 1 67 xl0 1186 192.168.22 link#2 UC 0 0 xl1 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%xl0/64 link#1 UC xl0 fe80::20a:5eff:fe05:3692%xl0 00:0a:5e:05:36:92 UHL lo0 fe80::%xl1/64 link#2 UC xl1 fe80::204:76ff:fea0:a912%xl1 00:04:76:a0:a9:12 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#4 UHL lo0 ff01::/32 ::1 U lo0 ff02::%xl0/32 link#1 UC xl0 ff02::%xl1/32 link#2 UC xl1 ff02::%lo0/32 ::1 UC lo0 |
#man netstat
|
#netstat -rn -f 4
![]() netstat: 4: unknown address family |
#netstat -rn -f inety
![]() netstat: inety: unknown address family |
#netstat -rn -f inet
![]() Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 xl0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 1 111 xl0 1177 192.168.22 link#2 UC 0 0 xl1 |
#arp -an
? (192.168.15.254) at 00:0a:01:d4:d1:39 on xl0 [ethernet] |
#netstat -rn -f inet
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 xl0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 1 117 xl0 1152 192.168.22 link#2 UC 0 0 xl1 |
#ping 192.168.15.1
![]() PING 192.168.15.1 (192.168.15.1): 56 data bytes ping: sendto: Host is down ^C --- 192.168.15.1 ping statistics --- 7 packets transmitted, 0 packets received, 100% packet loss |
#ping 1.2.3.4
![]() PING 1.2.3.4 (1.2.3.4): 56 data bytes ping: sendto: No route to host ^C --- 1.2.3.4 ping statistics --- 1 packets transmitted, 0 packets received, 100% packet loss |
#ping 192.168.15.21
PING 192.168.15.21 (192.168.15.21): 56 data bytes 64 bytes from 192.168.15.21: icmp_seq=0 ttl=64 time=0.260 ms 64 bytes from 192.168.15.21: icmp_seq=1 ttl=64 time=0.228 ms 64 bytes from 192.168.15.21: icmp_seq=2 ttl=64 time=0.225 ms 64 bytes from 192.168.15.21: icmp_seq=3 ttl=64 time=0.227 ms ^C --- 192.168.15.21 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.225/0.235/0.260/0.014 ms |
#arp -an
? (192.168.15.1) at (incomplete) on xl0 [ethernet] ? (192.168.15.21) at 00:01:02:b4:61:10 on xl0 [ethernet] ? (192.168.15.254) at 00:0a:01:d4:d1:39 on xl0 [ethernet] |
#netstat -rn -f inet
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 0 xl0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 xl0 192.168.15.1 link#1 UHRLW 1 7 xl0 192.168.15.21 00:01:02:b4:61:10 UHLW 1 10 xl0 1098 192.168.15.254 00:0a:01:d4:d1:39 UHLW 2 198 xl0 1041 192.168.22 link#2 UC 0 0 xl1 |
#/etc/rc.d/routing restart
add net default: gateway 192.168.15.254 Additional routing options:. |
#netstat -rn -f inet
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 0 xl0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 xl0 192.168.15.1 link#1 UHRLW 1 7 xl0 192.168.15.21 00:01:02:b4:61:10 UHLW 1 10 xl0 1106 192.168.15.254 00:0a:01:d4:d1:39 UHLW 2 194 xl0 1049 192.168.22 link#2 UC 0 0 xl1 |
#route add 192.168.3.0/24 192.168.15.3
add net 192.168.3.0: gateway 192.168.15.3 |
#ifconfig
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.15.22 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 scopeid 0x2 inet 192.168.22.2 netmask 0xffffff00 broadcast 192.168.22.255 ether 00:04:76:a0:a9:12 media: Ethernet autoselect (none) status: no carrier plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 |
#netstat -rn -f inet
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 0 xl0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.3 192.168.15.3 UGS 0 0 xl0 192.168.15 link#1 UC 0 0 xl0 192.168.15.1 link#1 UHRLW 1 7 xl0 192.168.15.3 link#1 UHLW 2 0 xl0 192.168.15.21 00:01:02:b4:61:10 UHLW 1 10 xl0 1049 192.168.15.254 00:0a:01:d4:d1:39 UHLW 2 243 xl0 992 192.168.22 link#2 UC 0 0 xl1 |
#route delete68.3.0/24 192.168.15.3
delete net 192.168.3.0: gateway 192.168.15.3 |
#arp -an
? (192.168.15.21) at 00:01:02:b4:61:10 on xl0 [ethernet] ? (192.168.15.254) at 00:0a:01:d4:d1:39 on xl0 [ethernet] |
#ping 192.168.15.199
![]() PING 192.168.15.199 (192.168.15.199): 56 data bytes ^C --- 192.168.15.199 ping statistics --- 1 packets transmitted, 0 packets received, 100% packet loss |
#netstat -rn -f inet
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 0 xl0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 xl0 192.168.15.21 00:01:02:b4:61:10 UHLW 1 10 xl0 674 192.168.15.199 link#1 UHLW 1 1 xl0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 2 328 xl0 617 192.168.22 link#2 UC 0 0 xl1 |
#arp -an
? (192.168.15.21) at 00:01:02:b4:61:10 on xl0 [ethernet] ? (192.168.15.199) at (incomplete) on xl0 [ethernet] ? (192.168.15.254) at 00:0a:01:d4:d1:39 on xl0 [ethernet] |
#vi /etc/rc.conf
13a14,19 > > static_routes="pervyi vtoroy tretiy" > route_pervyi="192.168.1.0/24 192.168.15.21" > route_vtoroy="192.168.2.0/24 192.168.15.22" > route_tretiy="192.168.3.0/24 192.168.15.23" > |
#/etc/rc.d/routing restart
default 192.168.15.254 done add net default: gateway 192.168.15.254 add net 192.168.1.0: gateway 192.168.15.21 add net 192.168.2.0: gateway 192.168.15.22 add net 192.168.3.0: gateway 192.168.15.23 Additional routing options:. |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 0 xl0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.1 192.168.15.21 UGS 0 0 xl0 192.168.2 192.168.15.22 UGS 0 0 xl0 192.168.3 192.168.15.23 UGS 0 0 xl0 192.168.15 link#1 UC 0 0 xl0 192.168.15.21 00:01:02:b4:61:10 UHLW 2 10 xl0 127 ... fe80::%xl0/64 link#1 UC xl0 fe80::20a:5eff:fe05:3692%xl0 00:0a:5e:05:36:92 UHL lo0 fe80::%xl1/64 link#2 UC xl1 fe80::204:76ff:fea0:a912%xl1 00:04:76:a0:a9:12 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#4 UHL lo0 ff01::/32 ::1 U lo0 ff02::%xl0/32 link#1 UC xl0 ff02::%xl1/32 link#2 UC xl1 ff02::%lo0/32 ::1 UC lo0 dobavlenie staticheskih marshrutov |
#l3-agent
l3-agent is already running: pid=1102; pidfile=/root/.lilalo/l3-agent.pid |
#ps aux | grep l3-agent
![]() |
#rm /root/.lilalo/l3-agent.pid
|
#l3-agent
|
#/etc/rc.d/netif restart
Stopping network: lo0 xl0 xl1. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.16.2 netmask 0xffffffc0 broadcast 192.168.16.63 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 scopeid 0x2 inet 192.168.16.65 netmask 0xffffffc0 broadcast 192.168.16.127 ether 00:04:76:a0:a9:12 media: Ethernet autoselect (none) status: no carrier |
#/etc/rc.d/routing restart
route: writing to routing socket: Network is unreachable add net default: gateway 192.168.15.254: Network is unreachable Additional routing options:. |
#/etc/rc.d/netif restart
Stopping network: lo0 xl0 xl1. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.16.2 netmask 0xffffffc0 broadcast 192.168.16.63 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 scopeid 0x2 inet 192.168.16.65 netmask 0xffffffc0 broadcast 192.168.16.127 ether 00:04:76:a0:a9:12 media: Ethernet autoselect (none) status: no carrier |
#ping 192.168.16.66
![]() PING 192.168.16.66 (192.168.16.66): 56 data bytes ^C --- 192.168.16.66 ping statistics --- 6 packets transmitted, 0 packets received, 100% packet loss |
#ifconfig
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.16.2 netmask 0xffffffc0 broadcast 192.168.16.63 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (none) status: no carrier xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 scopeid 0x2 inet 192.168.16.65 netmask 0xffffffc0 broadcast 192.168.16.127 ether 00:04:76:a0:a9:12 media: Ethernet autoselect (none) status: no carrier plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 |
#mc
|
#ifconfig
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.16.2 netmask 0xffffffc0 broadcast 192.168.16.63 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 scopeid 0x2 inet 192.168.16.65 netmask 0xffffffc0 broadcast 192.168.16.127 ether 00:04:76:a0:a9:12 media: Ethernet autoselect (none) status: no carrier plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 |
#mc
|
#/etc/rc.d/netif restart
Stopping network: lo0 xl0 xl1. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.16.65 netmask 0xffffffc0 broadcast 192.168.16.127 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 scopeid 0x2 inet 192.168.16.2 netmask 0xffffffc0 broadcast 192.168.16.63 ether 00:04:76:a0:a9:12 media: Ethernet autoselect (100baseTX <full-duplex>) status: active |
#ping 192.168.16.66
![]() PING 192.168.16.66 (192.168.16.66): 56 data bytes ^C --- 192.168.16.66 ping statistics --- 6 packets transmitted, 0 packets received, 100% packet loss |
#ping 192.168.16.1
PING 192.168.16.1 (192.168.16.1): 56 data bytes 64 bytes from 192.168.16.1: icmp_seq=1 ttl=64 time=0.288 ms 64 bytes from 192.168.16.1: icmp_seq=2 ttl=64 time=0.190 ms 64 bytes from 192.168.16.1: icmp_seq=3 ttl=64 time=0.162 ms 64 bytes from 192.168.16.1: icmp_seq=4 ttl=64 time=0.189 ms 64 bytes from 192.168.16.1: icmp_seq=5 ttl=64 time=0.177 ms 64 bytes from 192.168.16.1: icmp_seq=6 ttl=64 time=0.178 ms ^C --- 192.168.16.1 ping statistics --- 7 packets transmitted, 6 packets received, 14% packet loss round-trip min/avg/max/stddev = 0.162/0.197/0.288/0.042 ms |
#ping 192.168.16.66
![]() PING 192.168.16.66 (192.168.16.66): 56 data bytes ping: sendto: Host is down ping: sendto: Host is down ping: sendto: Host is down ^C --- 192.168.16.66 ping statistics --- 8 packets transmitted, 0 packets received, 100% packet loss |
#deco
Demos Commander, Copyright (C) 1989-1997 Serge Vakulenko |
#mc
|
#ping 192.168.16.66
![]() PING 192.168.16.66 (192.168.16.66): 56 data bytes ^C --- 192.168.16.66 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ifconfig
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.16.65 netmask 0xffffffc0 broadcast 192.168.16.127 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 scopeid 0x2 inet 192.168.16.2 netmask 0xffffffc0 broadcast 192.168.16.63 ether 00:04:76:a0:a9:12 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 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 |
#ifconfig
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::20a:5eff:fe05:3692%xl0 prefixlen 64 scopeid 0x1 inet 192.168.16.65 netmask 0xffffffc0 broadcast 192.168.16.127 ether 00:0a:5e:05:36:92 media: Ethernet autoselect (none) status: no carrier xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet6 fe80::204:76ff:fea0:a912%xl1 prefixlen 64 scopeid 0x2 inet 192.168.16.2 netmask 0xffffffc0 broadcast 192.168.16.63 ether 00:04:76:a0:a9:12 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 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 |
Время первой команды журнала | 08:11:43 2006- 4- 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:54:21 2006- 4- 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 11.22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.69 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.61 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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