/l3/trainings/nt-bsdnet/2006-04-03/fbsd3.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 |
|
#ifconfig
exit exit em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#mc
![]() |
#cd /usr/ports/
|
#whereis sudo
sudo: /usr/ports/security/sudo |
#cd /security/sudo
![]() bash: cd: /security/sudo: No such file or directory |
#cd security/
|
#cd sudo
|
#make install
checking for sys/bsdtypes.h... no checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking err.h usability... yes checking err.h presence... yes checking for err.h... yes checking POSIX termios... yes checking login_cap.h usability... yes checking login_cap.h presence... yes ... 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/ |
#man sudo
|
#visudo
# sudoers file. # # See the sudoers man page for the details on how to write a sudoers file. # sudoers file. # # See the sudoers man page for the details on how to write a sudoers file. # sudoers file. # # This file MUST be edited with the 'visudo' command as root. # ... # Host alias specification # User alias specification # Cmnd alias specification # Defaults specification # Runas alias specification # User privilege specification visudo: sudoers file unchanged A# Samples A# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom A# %users localhost=/sbin/shutdown -h now |
#visudo
# sudoers file. # # This file MUST be edited with the 'visudo' command as root. # # See the sudoers man page for the details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification # Defaults specification # Runas alias specification # User privilege specification root ALL=(ALL) ALL # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL # Same thing without a password visudo: sudoers file unchanged |
#man sudoers
|
#ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#cd /usr/local/etc/sudoers
![]() bash: cd: /usr/local/etc/sudoers: Not a directory |
#cd /usr/local/etc/sudoers
![]() bash: cd: /usr/local/etc/sudoers: Not a directory |
#ls -l
total 12 -rw-r--r-- 1 root wheel 1598 Jun 21 2005 Makefile -rw-r--r-- 1 root wheel 97 Jun 21 2005 distinfo -rw-r--r-- 1 root wheel 706 Dec 22 1999 pkg-descr -rwxr-xr-x 1 root wheel 280 Jul 20 2004 pkg-install -rw-r--r-- 1 root wheel 162 Aug 20 2004 pkg-plist drwxr-xr-x 3 root wheel 512 Apr 2 22:58 work |
#cd ..
|
#cd ..\
![]() > |
#cd ..
|
#cd ..
|
#cd ..
|
#cd /usr/local/
|
#pkg_info -Lx sudo | grep /etc
/usr/local/etc/sudoers.sample |
#cd ..
|
#cd ..
|
#cd /usr/local/etc/
|
#ls -l -A
total 74 drwxr-xr-x 2 root wheel 512 Mar 31 12:16 bonobo-activation -r--r--r-- 1 root wheel 1107 Mar 31 12:17 cdrecord -r--r--r-- 1 root wheel 1107 Oct 12 10:48 cdrecord.sample drwxr-xr-x 5 root wheel 512 Mar 31 12:07 cups -r--r--r-- 1 root wheel 153 Mar 31 12:16 esd.conf -r--r--r-- 1 root wheel 153 Oct 12 13:44 esd.conf.default -r--r--r-- 1 root wheel 1480 Oct 12 15:59 fam.conf -r--r--r-- 1 root wheel 848 May 23 2005 ksysguarddrc drwxr-xr-x 2 root wheel 512 Mar 31 12:10 openldap ... -r--r--r-- 1 root wheel 13744 Mar 31 12:07 pkgtools.conf -r--r--r-- 1 root wheel 13744 Oct 12 09:00 pkgtools.conf.sample -r-xr-xr-x 1 root wheel 704 Oct 12 09:00 pkgtools.status-pkg.sh drwxr-xr-x 2 root wheel 512 Mar 31 12:16 rc.d drwxr-xr-x 2 root wheel 512 Mar 31 12:13 snmp -r--r----- 1 root wheel 608 Apr 2 22:58 sudoers -r--r--r-- 1 root wheel 4127 Apr 2 22:58 sudoers.sample drwxr-xr-x 3 root wheel 512 Mar 31 12:10 xdg -r--r--r-- 1 root wheel 340 Oct 12 12:38 xml2Conf.sh -r--r--r-- 1 root wheel 232 Oct 12 14:16 xsltConf.sh |
#vi sudoers
|
#pkg_info -Lx sudo | grep /etc
/usr/local/etc/sudoers.sample |
#visudo
# sudoers file. # # This file MUST be edited with the 'visudo' command as root. # # See the sudoers man page for the details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification # Defaults specification # Runas alias specification # User privilege specification root ALL=(ALL) ALL # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL # Same thing without a password visudo: sudoers file unchanged |
#cp /etc/lo
![]() localtime locate.rc login.access login.conf login.conf.db |
#cp /etc/lo
![]() localtime locate.rc login.access login.conf login.conf.db |
#cp /usr/local/etc/sudoers{.sample,}
|
#vi /usr/local/etc/sudoers
|
#vi /usr/local/etc/sudoers
|
#vim /usr/local/etc/sudoers
|
#touch ~/.vimrc
|
#vim /usr/local/etc/sudoers
|
#traceroute 80.91.162.154
traceroute to 80.91.162.154 (80.91.162.154), 64 hops max, 40 byte packets 1 linux.nt (192.168.15.254) 0.311 ms 0.249 ms 0.221 ms 2 10.0.1.1 (10.0.1.1) 0.531 ms 0.429 ms 0.459 ms 3 * * * 4 tekexpert-lgw.sovam.net.ua (62.64.113.245) 40.352 ms 40.239 ms 40.684 ms 5 srp-2-1-cr0-co11.kv.sovam.net.ua (212.109.37.9) 40.926 ms 41.133 ms 40.545 ms 6 gi-0-1-55-br1-co11.kv.sovam.net.ua (85.223.224.101) 42.431 ms 41.365 ms 41.053 ms 7 datacom-gw.ix.net.ua (195.35.65.32) 46.426 ms 42.490 ms 42.300 ms 8 KE1-KTU.rtr.newline.net.ua (80.91.160.70) 43.050 ms 43.374 ms 42.803 ms 9 ll-datasat-r.newline.net.ua (80.91.160.222) 44.048 ms 44.378 ms 43.312 ms 10 * * * 11 * * * 12 gw.megabit.com.ua (80.91.160.214) 1844.892 ms 1720.702 ms 2025.306 ms 13 ns.zarja.com.ua (80.91.162.154) 2316.606 ms 3500.209 ms 2487.506 ms |
#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) |
#ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#man em
|
#whatis em
em(4) - Intel(R) PRO/1000 Gigabit Ethernet adapter driver |
#whatis xl
xl(4) - 3Com Etherlink XL and Fast Etherlink XL Ethernet device driver |
#apr
![]() apr-1-config apropos |
#apropos
![]() usage: apropos keyword ... |
#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) |
#whereis mc
mc: /usr/ports/misc/mc |
#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 |
#ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#!if
ifconfig em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#traceroute zarja.com.ua
traceroute to zarja.com.ua (80.91.162.154), 64 hops max, 40 byte packets 1 linux.nt (192.168.15.254) 0.378 ms 0.286 ms 0.209 ms 2 10.0.1.1 (10.0.1.1) 0.442 ms 0.431 ms 0.334 ms 3 * * * 4 tekexpert-lgw.sovam.net.ua (62.64.113.245) 43.761 ms 40.901 ms 40.183 ms 5 srp-2-1-cr0-co11.kv.sovam.net.ua (212.109.37.9) 40.679 ms 41.528 ms 40.933 ms 6 gi-0-1-55-br1-co11.kv.sovam.net.ua (85.223.224.101) 41.052 ms 41.905 ms 42.305 ms 7 datacom-gw.ix.net.ua (195.35.65.32) 42.681 ms 42.777 ms 42.446 ms 8 KE1-KTU.rtr.newline.net.ua (80.91.160.70) 43.418 ms 42.148 ms 42.430 ms 9 ll-datasat-r.newline.net.ua (80.91.160.222) 44.309 ms 43.782 ms 44.052 ms 10 * * * 11 * * * 12 gw.megabit.com.ua (80.91.160.214) 1492.501 ms 3427.516 ms 2814.294 ms 13 ns.zarja.com.ua (80.91.162.154) 1333.235 ms 2191.067 ms 2059.775 ms |
#make install
checking host system type... i386-portbld-freebsd6.0 checking for dlfcn.h... (cached) yes checking for dlopen in -ldl... (cached) no checking for dlopen... (cached) yes checking for Terminfo... no updating cache .././config.cache creating ./config.status creating Makefile Configuration complete. You may need to edit src/Makefile. You are compiling SLANG with the following compiler configuration: ... cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slbstr.c cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slpack.c cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slintall.c cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slistruc.c cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slposio.c cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slnspace.c cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slarrmis.c cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slospath.c cd /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs; cc -c -O2 -fno-strict-aliasing -pipe -fno-strength-reduce -fPIC -Dunix -DSLANG /usr/ports/devel/libslang/work/slang-1.4.9/src/slscanf.c rm -f /usr/ports/devel/libslang/work/slang-1.4.9/src/elfi386objs/libslang.so.1 |
#ssh 80.91.162.154
![]() ssh_exchange_identification: Connection closed by remote host |
#pkg_info
kdegames-3.4.2_1 Games for the KDE integrated X11 desktop kdegraphics-3.4.2_1 Graphics utilities for the KDE3 integrated X11 desktop kdehier-1.0_6 Utility port which installs a hierarchy of shared KDE direc kdelibs-3.4.2_1 Base set of libraries needed by KDE programs kdemultimedia-3.4.2 Multimedia utilities for the KDE integrated X11 desktop kdemultimedia-akode-3.4.2 Default KDE audio backend kdemultimedia-akode-plugins-mpc-3.4.2 Musepack decoder plugin for akode kdemultimedia-akode-plugins-mpeg-3.4.2 MPEG audio decoder plugin for akode kdemultimedia-akode-plugins-oss-3.4.2 OSS output plugin for akode kdemultimedia-akode-plugins-resampler-3.4.2 Resampler plugin for akode ... xorg-nestserver-6.8.2 Nesting X server from X.Org xorg-printserver-6.8.2 X Print server from X.Org xorg-server-6.8.2_6 X.Org X server and related programs xorg-vfbserver-6.8.2 X virtual framebuffer server from X.Org xpdf-3.00_7 Display PDF files, and convert them to other formats xscreensaver-gnome-4.22 Save your screen while you entertain your cat (for GNOME us xterm-203 Terminal emulator for the X Window System xvid-1.0.3,1 An opensource MPEG-4 codec, based on OpenDivx yelp-2.10.0_1 A help browser for the GNOME 2 desktop zenity-2.10.0 Display GNOME dialogs from the command line |
#pkg_
pkg_add pkg_deinstall pkg_glob pkg_sort pkg_check pkg_delete pkg_info pkg_version pkg_create pkg_fetch pkg_sign pkg_which |
#ssh 80.91.162.154
![]() exit ssh_exchange_identification: Connection closed by remote host |
#mc
|
#ssh 80.91.162.154
![]() ssh_exchange_identification: Connection closed by remote host |
#man vidcontrol
|
#vidcontrol mode 132x42
![]() vidcontrol: getting active vty: Inappropriate ioctl for device |
#vidcontrol mode 132x43
![]() vidcontrol: getting active vty: Inappropriate ioctl for device |
#vidcontrol mode 132x30
![]() vidcontrol: getting active vty: Inappropriate ioctl for device |
#vidcontrol mode 132x30
![]() vidcontrol: getting active vty: Inappropriate ioctl for device |
#ssh 80.91.162.154
![]() exit ssh_exchange_identification: Connection closed by remote host |
#uptime
12:30AM up 11 mins, 3 users, load averages: 0.00, 0.04, 0.05 |
#ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#ifconfig xl0 192.168.24.1/24
|
#ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet 192.168.24.1 netmask 0xffffff00 broadcast 192.168.24.255 inet6 fe80::204:76ff:fea1:f21e%xl0 prefixlen 64 scopeid 0x2 ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#shutdown now
Shutdown NOW! shutdown: [pid 885] |
#ifconfig
exit em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet 192.168.24.1 netmask 0xffffff00 broadcast 192.168.24.255 inet6 fe80::204:76ff:fea1:f21e%xl0 prefixlen 64 scopeid 0x2 ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#ping 80.91.162.154
PING 80.91.162.154 (80.91.162.154): 56 data bytes 64 bytes from 80.91.162.154: icmp_seq=0 ttl=51 time=1252.854 ms 64 bytes from 80.91.162.154: icmp_seq=1 ttl=51 time=1187.062 ms ^C --- 80.91.162.154 ping statistics --- 4 packets transmitted, 2 packets received, 50% packet loss round-trip min/avg/max/stddev = 1187.062/1219.958/1252.854/32.896 ms |
#ping -c 10 80.91.162.154
PING 80.91.162.154 (80.91.162.154): 56 data bytes 64 bytes from 80.91.162.154: icmp_seq=0 ttl=51 time=1640.217 ms 64 bytes from 80.91.162.154: icmp_seq=1 ttl=51 time=775.543 ms 64 bytes from 80.91.162.154: icmp_seq=2 ttl=51 time=2121.706 ms 64 bytes from 80.91.162.154: icmp_seq=3 ttl=51 time=1208.419 ms 64 bytes from 80.91.162.154: icmp_seq=4 ttl=51 time=1748.590 ms 64 bytes from 80.91.162.154: icmp_seq=5 ttl=51 time=860.664 ms 64 bytes from 80.91.162.154: icmp_seq=6 ttl=51 time=1927.250 ms 64 bytes from 80.91.162.154: icmp_seq=7 ttl=51 time=1138.385 ms 64 bytes from 80.91.162.154: icmp_seq=8 ttl=51 time=1531.901 ms 64 bytes from 80.91.162.154: icmp_seq=9 ttl=51 time=909.928 ms --- 80.91.162.154 ping statistics --- 10 packets transmitted, 10 packets received, 0% packet loss round-trip min/avg/max/stddev = 775.543/1386.260/2121.706/449.414 ms |
#ssh 80.91.162.154
![]() exit ssh_exchange_identification: Connection closed by remote host |
#ssh 80.91.162.154
![]() ssh_exchange_identification: Connection closed by remote host |
#ssh 80.91.162.154
![]() ssh_exchange_identification: Connection closed by remote host |
#ssh 80.91.162.154
![]() ssh_exchange_identification: Connection closed by remote host |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 34 em0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 em0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 2 9 em0 1138 192.168.24 link#2 UC 0 0 xl0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%em0/64 link#1 UC em0 fe80::207:e9ff:fe3c:2c15%em0 00:07:e9:3c:2c:15 UHL lo0 fe80::%xl0/64 link#2 UC xl0 fe80::204:76ff:fea1:f21e%xl0 00:04:76:a1:f2:1e UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#3 UHL lo0 ff01::/32 ::1 U lo0 ff02::%em0/32 link#1 UC em0 ff02::%xl0/32 link#2 UC xl0 ff02::%lo0/32 ::1 UC lo0 |
#ssh 80.91.162.154
![]() The authenticity of host '80.91.162.154 (80.91.162.154)' can't be established. DSA key fingerprint is 12:fd:fa:62:d3:ac:11:36:5a:2c:6f:c5:87:99:7e:33. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '80.91.162.154' (DSA) to the list of known hosts. Password: |
#netstat -rn -f inet
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 34 em0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 em0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 2 9 em0 1105 192.168.24 link#2 UC 0 0 xl0 |
#ssh -u dimag 80.91.162.154
![]() ssh: illegal option -- u usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec] [-D port] [-e escape_char] [-F configfile] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [user@]hostname [command] |
#ssh -l dimag 80.91.162.154
<~v></v> /.. -÷÷åòè- /.snap 512ÄÅË 26 21:14 /.ssh 512ÉÀÎ 13 2004/boot 512ÍÁÒ 22 21:30 /Free Midnight Commander 2 2003 /parus 3 11:42 /traf 16 09:42 .cshrc 768ÁÐÒ 2 2004/mnt 512ÓÅÎ 1 2003 .login_conf 159ÁÐÒ 2 2004/rescue 512ÓÅÎ 1 2003 .mailboxlist 36ÑÎ× 12 21:46/sbin 2560ÆÅ× 16 09:43 ... 11:58 up 11 days, 13:27, 2 users, load averages: 0,00 0,01 0,00 USER TTY FROM LOGIN@ IDLE WHAT kekek p0 bestway.lg.ua 11:39 1 -zsh (zsh) dimag p5 mail.tex.kiev.ua 11:46 - w dimag@ns:~-> w 12:22 up 11 days, 13:50, 1 user, load averages: 0,00 0,00 0,00 USER TTY FROM LOGIN@ IDLE WHAT dimag p5 mail.tex.kiev.ua 11:46 - w dimag@ns:~-> exit Connection to 80.91.162.154 closed. |
#ping
![]() usage: ping [-AaDdfnoQqRrv] [-c count] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-t timeout] [-z tos] [-G sweepmaxsize ] [-g sweepminsize ] [-h sweepincrsize ] host ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-T ttl] [-t timeout] [-z tos] mcast-group |
#ping fbsd1
PING fbsd1.unix.nt (192.168.15.21): 56 data bytes 64 bytes from 192.168.15.21: icmp_seq=0 ttl=64 time=0.473 ms 64 bytes from 192.168.15.21: icmp_seq=1 ttl=64 time=0.226 ms 64 bytes from 192.168.15.21: icmp_seq=2 ttl=64 time=0.238 ms 64 bytes from 192.168.15.21: icmp_seq=3 ttl=64 time=0.247 ms 64 bytes from 192.168.15.21: icmp_seq=4 ttl=64 time=0.249 ms 64 bytes from 192.168.15.21: icmp_seq=5 ttl=64 time=0.262 ms 64 bytes from 192.168.15.21: icmp_seq=6 ttl=64 time=0.275 ms 64 bytes from 192.168.15.21: icmp_seq=7 ttl=64 time=0.282 ms 64 bytes from 192.168.15.21: icmp_seq=8 ttl=64 time=0.297 ms 64 bytes from 192.168.15.21: icmp_seq=9 ttl=64 time=0.194 ms 64 bytes from 192.168.15.21: icmp_seq=10 ttl=64 time=0.204 ms ^C --- fbsd1.unix.nt ping statistics --- 11 packets transmitted, 11 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.194/0.268/0.473/0.071 ms |
#ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1 inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:2c:15 media: Ethernet autoselect (100baseTX <full-duplex>) status: active xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=9<RXCSUM,VLAN_MTU> inet 192.168.24.1 netmask 0xffffff00 broadcast 192.168.24.255 inet6 fe80::204:76ff:fea1:f21e%xl0 prefixlen 64 scopeid 0x2 ether 00:04:76:a1:f2:1e media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 |
#ifconfig xl0 down
|
#ping fbsd1
PING fbsd1.unix.nt (192.168.15.21): 56 data bytes 64 bytes from 192.168.15.21: icmp_seq=0 ttl=64 time=0.240 ms 64 bytes from 192.168.15.21: icmp_seq=1 ttl=64 time=0.267 ms 64 bytes from 192.168.15.21: icmp_seq=2 ttl=64 time=0.280 ms 64 bytes from 192.168.15.21: icmp_seq=3 ttl=64 time=0.292 ms 64 bytes from 192.168.15.21: icmp_seq=4 ttl=64 time=0.185 ms 64 bytes from 192.168.15.21: icmp_seq=5 ttl=64 time=0.313 ms ^C --- fbsd1.unix.nt ping statistics --- 6 packets transmitted, 6 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.185/0.263/0.313/0.041 ms |
#ping fbsd1
![]() |
#arp
![]() usage: arp [-n] [-i interface] hostname arp [-n] [-i interface] -a arp -d hostname [pub] arp -d -a arp -s hostname ether_addr [temp] [pub] arp -S hostname ether_addr [temp] [pub] arp -f filename |
#arp -i
![]() arp: option requires an argument -- i usage: arp [-n] [-i interface] hostname arp [-n] [-i interface] -a arp -d hostname [pub] arp -d -a arp -s hostname ether_addr [temp] [pub] arp -S hostname ether_addr [temp] [pub] arp -f filename |
#arp -an
? (192.168.15.21) at 00:01:02:b4:61:10 on em0 [ethernet] ? (192.168.15.254) at 00:0a:01:d4:d1:39 on em0 [ethernet] |
#netstat -rn -f inet
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 65 em0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.15 link#1 UC 0 0 em0 192.168.15.21 00:01:02:b4:61:10 UHLW 1 17 em0 1088 192.168.15.254 00:0a:01:d4:d1:39 UHLW 2 11 em0 1096 |
#route add 192.168.3.0/24 192.168.15.3
add net 192.168.3.0: gateway 192.168.15.3 |
Время первой команды журнала | 22:53:54 2006- 4- 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 00:50:38 2006- 4- 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 23.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.95 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.86 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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