/l3/users/dmitry.z/nt-voip/linux1.unix.nt/root :1 :2 :3 :4 |
|
#test2
bash: test2: command not found |
#usermode -s /bin/bash usr1
bash: usermode: command not found |
#usermod -s /bin/bash usr1
|
#usermod -s /bin/bash usr2
usermod: user 'usr2' does not exist |
#dpkg-reconfigure locales
│ │ │ This will select the default language for the entire system. If this system is a │ │ multi-user system where not all users are able to speak the default language, │ │ they will experience difficulties. │ │ │ │ Default locale for the system environment: │ │ │ │ None │ │ en_US.UTF-8-8 │ │ ru_UA.UTF-8 │ │ │ │ │ │ <Ok> <Cancel> │ │ │ └───────────────────────────────────────────────────────────────────────────────────┘ Generating locales (this might take a while)... en_US.UTF-8... done ru_UA.UTF-8... done Generation complete. |
#date
Mon Apr 23 12:30:48 EEST 2012 |
#apt-cache asterisk
E: Invalid operation asterisk |
#apt-cache get asterisk
E: Invalid operation get |
#apt-cache ?
E: Invalid operation ? |
#ma napt-cache
bash: ma: command not found |
#man apt-cache
|
#apt-cache search asterisk
asterisk-mobile - bluetooth mobile devices support for Asterisk asterisk-mp3 - MP3 format support (format_mp3) for the Asterisk PBX asterisk-mysql - MySQL support for the Asterisk PBX (cdr mainly) asterisk-ooh323c - H.323 protocol support for Asterisk (ooh323c stack) asterisk-chan-capi - Common ISDN API 2.0 implementation for Asterisk asterisk-core-sounds-en-g722 - asterisk PBX sound files - English/g722 asterisk-core-sounds-en-gsm - asterisk PBX sound files - English/gsm asterisk-core-sounds-en-wav - asterisk PBX sound files - English/wav asterisk-core-sounds-es-g722 - asterisk PBX sound files - Spanish/g722 asterisk-core-sounds-es-gsm - asterisk PBX sound files - Spanish/gsm ... asterisk - Open Source Private Branch Exchange (PBX) dahdi-linux - DAHDI telephony interface - Linux userspace parts dahdi-source - DAHDI telephony interface - source code for kernel driver dahdi - utilities for using the DAHDI kernel modules iaxmodem - software modem with IAX2 connectivity libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI libnetsds-perl - Service Delivery Suite framework op-panel - switchboard type application for the Asterisk PBX libopenr2-3 - MFC/R2 (telephony) call setup library python-asterisk - Asterisk Manager API interface module for Python |
#vim /etc/bash.bashrc
--- /tmp/l3-saved-1793.23413.31217 2012-04-23 12:35:57.000000000 +0300 +++ /etc/bash.bashrc 2012-04-23 12:36:39.000000000 +0300 @@ -29,9 +29,9 @@ #esac # enable bash completion in interactive shells -#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then -# . /etc/bash_completion -#fi +if [ -f /etc/bash_completion ] && ! shopt -oq posix; then + . /etc/bash_completion +fi # if the command-not-found package is installed, use it if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found ]; then |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze4, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze4 currently running on linux1 (pid = 5208) linux1*CLI> dialplan No such command 'dialplan' (type 'core show help dialplan' for other possible commands) linux1*CLI> dialplan reload Dialplan reloaded. linux1*CLI> Disconnected from Asterisk server |
#dpkg -L asterisk | LESS
bash: LESS: command not found |
#dpkg -L asterisk | less
|
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze4, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze4 currently running on linux1 (pid = 5406) linux1*CLI> Disconnected from Asterisk server |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze4 currently running on linux1 (pid = 5406) ... format_siren7.so ITU G.722.1 (Siren7, licensed from Polyc 0 app_voicemail.so Comedian Mail (Voicemail System) 0 format_vox.so Dialogic VOX (ADPCM) File Format 0 func_channel.so Channel information dialplan functions 0 func_groupcount.so Channel group dialplan functions 0 app_nbscat.so Silly NBS Stream Application 0 198 modules loaded linux1*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:553952 errors:0 dropped:2 overruns:0 frame:0 TX packets:265312 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:814188929 (776.4 MiB) TX bytes:18833323 (17.9 MiB) Interrupt:19 Memory:f0180000-f01a0000 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:21 errors:0 dropped:0 overruns:0 frame:0 TX packets:21 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1368 (1.3 KiB) TX bytes:1368 (1.3 KiB) |
#service network restart
network: unrecognized service |
#network restart
bash: network: command not found |
#/etc/init.d/network restart
bash: /etc/init.d/network: No such file or directory |
#/etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning). Reconfiguring network interfaces...SIOCDELRT: No such process done. |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:556746 errors:0 dropped:2 overruns:0 frame:0 TX packets:266878 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:814547210 (776.8 MiB) TX bytes:19020010 (18.1 MiB) Interrupt:19 Memory:f0180000-f01a0000 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:21 errors:0 dropped:0 overruns:0 frame:0 TX packets:21 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1368 (1.3 KiB) TX bytes:1368 (1.3 KiB) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:557097 errors:0 dropped:2 overruns:0 frame:0 TX packets:267006 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:814582994 (776.8 MiB) TX bytes:19030475 (18.1 MiB) Interrupt:19 Memory:f0180000-f01a0000 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:21 errors:0 dropped:0 overruns:0 frame:0 TX packets:21 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1368 (1.3 KiB) TX bytes:1368 (1.3 KiB) |
#cd /etc/network
|
#ls
if-down.d if-post-down.d if-pre-up.d if-up.d interfaces run |
#vim interfaces
|
#infconfig
bash: infconfig: command not found |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:557287 errors:0 dropped:5 overruns:0 frame:0 TX packets:267026 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:814597648 (776.8 MiB) TX bytes:19036310 (18.1 MiB) Interrupt:19 Memory:f0180000-f01a0000 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:21 errors:0 dropped:0 overruns:0 frame:0 TX packets:21 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1368 (1.3 KiB) TX bytes:1368 (1.3 KiB) |
#vim interfaces
|
# dns-nameservers 10.0.35.1
(1) Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r interfaces" to recover the changes (see ":help recovery"). If you did this already, delete the swap file ".interfaces.swp" to avoid this message. Swap file ".interfaces.swp" already exists! |
#vim interfaces
|
#vim interfaces
|
#ifdonw eth0
bash: ifdonw: command not found |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifup eth0
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:557679 errors:0 dropped:5 overruns:0 frame:0 TX packets:267082 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:814631735 (776.8 MiB) TX bytes:19049154 (18.1 MiB) Interrupt:19 Memory:f0180000-f01a0000 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:28 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1964 (1.9 KiB) TX bytes:1964 (1.9 KiB) |
#ping 192.168.10.101
PING 192.168.10.101 (192.168.10.101) 56(84) bytes of data. ^C --- 192.168.10.101 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4023ms |
#ping 192.168.10.11
PING 192.168.10.11 (192.168.10.11) 56(84) bytes of data. ^X^C --- 192.168.10.11 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping 192.168.10.254
PING 192.168.10.254 (192.168.10.254) 56(84) bytes of data. From 192.168.10.1 icmp_seq=1 Destination Host Unreachable From 192.168.10.1 icmp_seq=2 Destination Host Unreachable ^C --- 192.168.10.254 ping statistics --- 5 packets transmitted, 0 received, +2 errors, 100% packet loss, time 3999ms pipe 2 |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:557813 errors:0 dropped:5 overruns:0 frame:0 TX packets:267115 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:814640871 (776.9 MiB) TX bytes:19051536 (18.1 MiB) Interrupt:19 Memory:f0180000-f01a0000 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:47 errors:0 dropped:0 overruns:0 frame:0 TX packets:47 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3887 (3.7 KiB) TX bytes:3887 (3.7 KiB) |
#ping 192.168.10.254
PING 192.168.10.254 (192.168.10.254) 56(84) bytes of data. From 192.168.10.1 icmp_seq=1 Destination Host Unreachable From 192.168.10.1 icmp_seq=2 Destination Host Unreachable ^C --- 192.168.10.254 ping statistics --- 4 packets transmitted, 0 received, +2 errors, 100% packet loss, time 2999ms pipe 2 |
#ping 192.168.10.254
PING 192.168.10.254 (192.168.10.254) 56(84) bytes of data. From 192.168.10.1 icmp_seq=2 Destination Host Unreachable From 192.168.10.1 icmp_seq=3 Destination Host Unreachable From 192.168.10.1 icmp_seq=4 Destination Host Unreachable ^C --- 192.168.10.254 ping statistics --- 6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5009ms pipe 3 |
#ping 192.168.10.254
PING 192.168.10.254 (192.168.10.254) 56(84) bytes of data. From 192.168.10.1 icmp_seq=2 Destination Host Unreachable From 192.168.10.1 icmp_seq=3 Destination Host Unreachable ^C --- 192.168.10.254 ping statistics --- 6 packets transmitted, 0 received, +2 errors, 100% packet loss, time 5031ms pipe 2 |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:558506 errors:0 dropped:5 overruns:0 frame:0 TX packets:267197 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:814693145 (776.9 MiB) TX bytes:19056864 (18.1 MiB) Interrupt:19 Memory:f0180000-f01a0000 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:95 errors:0 dropped:0 overruns:0 frame:0 TX packets:95 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8504 (8.3 KiB) TX bytes:8504 (8.3 KiB) |
#ping 192.168.10.254
PING 192.168.10.254 (192.168.10.254) 56(84) bytes of data. From 192.168.10.1 icmp_seq=1 Destination Host Unreachable From 192.168.10.1 icmp_seq=2 Destination Host Unreachable From 192.168.10.1 icmp_seq=3 Destination Host Unreachable From 192.168.10.1 icmp_seq=5 Destination Host Unreachable From 192.168.10.1 icmp_seq=6 Destination Host Unreachable From 192.168.10.1 icmp_seq=8 Destination Host Unreachable From 192.168.10.1 icmp_seq=9 Destination Host Unreachable From 192.168.10.1 icmp_seq=10 Destination Host Unreachable From 192.168.10.1 icmp_seq=11 Destination Host Unreachable ... 64 bytes from 192.168.10.254: icmp_req=28 ttl=64 time=0.700 ms 64 bytes from 192.168.10.254: icmp_req=29 ttl=64 time=0.702 ms 64 bytes from 192.168.10.254: icmp_req=30 ttl=64 time=0.690 ms 64 bytes from 192.168.10.254: icmp_req=31 ttl=64 time=0.699 ms 64 bytes from 192.168.10.254: icmp_req=32 ttl=64 time=0.693 ms 64 bytes from 192.168.10.254: icmp_req=33 ttl=64 time=0.711 ms ^C --- 192.168.10.254 ping statistics --- 33 packets transmitted, 12 received, +17 errors, 63% packet loss, time 32117ms rtt min/avg/max/mdev = 0.675/263.981/2003.762/591.373 ms, pipe 3 |
#apt-get search dhcp
E: Invalid operation search |
#ssh user@192.168.15.252
Connection to 192.168.15.254 closed. [root@linux0:tmp]# [root@linux0:tmp]# [root@linux0:tmp]# #helo |
#apt-get install dhcp3-server
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: isc-dhcp-server Suggested packages: isc-dhcp-server-ldap The following NEW packages will be installed: dhcp3-server isc-dhcp-server 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15+squeeze3_i386.deb) ... Selecting previously deselected package dhcp3-server. Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15+squeeze3_all.deb) ... Processing triggers for man-db ... Setting up isc-dhcp-server (4.1.1-P1-15+squeeze3) ... Generating /etc/default/isc-dhcp-server... Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed! failed! invoke-rc.d: initscript isc-dhcp-server, action "start" failed. Setting up dhcp3-server (4.1.1-P1-15+squeeze3) ... |
#/etc/init.d/dhcp-server restart
bash: /etc/init.d/dhcp-server: No such file or directory |
#/etc/init.d/dhcp restart
bash: /etc/init.d/dhcp: No such file or directory |
#/etc/init.d/dhcp3-server restart
bash: /etc/init.d/dhcp3-server: No such file or directory |
#/etc/init.d/dhcpd restart
bash: /etc/init.d/dhcpd: No such file or directory |
#dhcpd restart
Internet Systems Consortium DHCP Server 4.1.1-P1 Copyright 2004-2010 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Wrote 0 leases to leases file. No subnet declaration for restart (no IPv4 addresses). ** Ignoring requests on restart. If this is not what you want, please write a subnet declaration in your dhcpd.conf file for the network segment to which interface restart is attached. ** Not configured to listen on any interfaces! |
#vim /etc/dhcp/dhcpd.conf
|
#ls /etc/default/
acpid bootlogd exim4 ifupdown nfs-common rsyslog alsa console-setup grub isc-dhcp-server ntpdate saned asterisk cron hal kdm.d portmap ssh avahi-daemon dbus halt keyboard rcS tmpfs bluetooth devpts hdparm locale rsync useradd |
#cd /etc/
|
#ls def*
default: acpid bootlogd exim4 ifupdown nfs-common rsyslog alsa console-setup grub isc-dhcp-server ntpdate saned asterisk cron hal kdm.d portmap ssh avahi-daemon dbus halt keyboard rcS tmpfs bluetooth devpts hdparm locale rsync useradd defoma: config fontconfig.subst-rule loc-cset.data xenc-cset.data csetenc-xenc.data2 hints ps-cset-enc.data |
#ls def*
default: acpid bootlogd exim4 ifupdown nfs-common rsyslog alsa console-setup grub isc-dhcp-server ntpdate saned asterisk cron hal kdm.d portmap ssh avahi-daemon dbus halt keyboard rcS tmpfs bluetooth devpts hdparm locale rsync useradd defoma: config fontconfig.subst-rule loc-cset.data xenc-cset.data csetenc-xenc.data2 hints ps-cset-enc.data |
#vim /etc/default/isc-dhcp-server
--- /tmp/l3-saved-1793.26270.19667 2012-04-23 14:57:29.000000000 +0300 +++ /etc/default/isc-dhcp-server 2012-04-23 14:57:42.000000000 +0300 @@ -8,4 +8,4 @@ # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". -INTERFACES="" +INTERFACES="eth0" |
#vim /etc/default/isc-dhcp-server
|
#vim /etc/default/isc-dhcp-server
|
#vim /etc/dhcp/dhcpd.conf
|
#dhcpd restart
Internet Systems Consortium DHCP Server 4.1.1-P1 Copyright 2004-2010 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Wrote 0 leases to leases file. No subnet declaration for restart (no IPv4 addresses). ** Ignoring requests on restart. If this is not what you want, please write a subnet declaration in your dhcpd.conf file for the network segment to which interface restart is attached. ** Not configured to listen on any interfaces! |
#vim /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-2168.6730.10921 2012-04-23 15:06:57.000000000 +0300 +++ /etc/dhcp/dhcpd.conf 2012-04-23 15:08:07.000000000 +0300 @@ -27,15 +27,15 @@ # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. -#subnet 10.152.187.0 netmask 255.255.255.0 { -#} +subnet 10.152.1:87.0 netmask 255.255.255.0 { +} # This is a very basic subnet declaration. -subnet 192.168.10.0 netmask 255.255.255.0 { - range 192.168.10.200 192.168.10.250; - option routers 192.168.10.254; -} +#subnet 192.168.10.0 netmask 255.255.255.0 { +# range 192.168.10.200 192.168.10.250; +# option routers 192.168.10.254; +#} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. |
#vim /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-2168.28415.12211 2012-04-23 15:08:15.000000000 +0300 +++ /etc/dhcp/dhcpd.conf 2012-04-23 15:12:09.000000000 +0300 @@ -27,15 +27,15 @@ # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. -subnet 10.152.1:87.0 netmask 255.255.255.0 { -} +#subnet 10.152.1:87.0 netmask 255.255.255.0 { +#} # This is a very basic subnet declaration. -#subnet 192.168.10.0 netmask 255.255.255.0 { -# range 192.168.10.200 192.168.10.250; -# option routers 192.168.10.254; -#} +subnet 192.168.10.0 netmask 255.255.255.0 { + range 192.168.10.200 192.168.10.250; + option routers 192.168.10.254; +} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. |
#cd default
|
#ls
acpid bootlogd exim4 ifupdown nfs-common rsyslog alsa console-setup grub isc-dhcp-server ntpdate saned asterisk cron hal kdm.d portmap ssh avahi-daemon dbus halt keyboard rcS tmpfs bluetooth devpts hdparm locale rsync useradd |
#/etc/default/isc-dhcp-server restart
bash: /etc/default/isc-dhcp-server: Permission denied |
#sudo -m
sudo: invalid option -- 'm' usage: sudo -h | -K | -k | -L | -V usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid] usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command] usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>] usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ... |
#sudo
usage: sudo -h | -K | -k | -L | -V usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid] usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command] usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>] usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ... |
#su
|
#~
[Apr 23 12:39:14] NOTICE[5208] cdr.c: CDR simple logging enabled. [Apr 23 12:39:14] NOTICE[5208] loader.c: 198 modules will be loaded. [Apr 23 12:39:14] NOTICE[5208] res_odbc.c: res_odbc loaded. [Apr 23 12:39:14] NOTICE[5208] config.c: Registered Config Engine sqlite [Apr 23 12:39:14] NOTICE[5208] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener. [Apr 23 12:39:14] WARNING[5208] res_config_ldap.c: No directory user found, anonymous binding as default. [Apr 23 12:39:14] ERROR[5208] res_config_ldap.c: No directory URL or host found. [Apr 23 12:39:14] NOTICE[5208] res_config_ldap.c: Cannot load LDAP RealTime driver. [Apr 23 12:39:14] ERROR[5208] chan_vpb.cc: No Voicetronix cards detected [Apr 23 12:39:14] ERROR[5208] ais/clm.c: Could not initialize cluster membership service: Try Again [Apr 23 12:39:14] WARNING[5208] translate.c: plc_samples 160 format f [Apr 23 12:39:14] NOTICE[5208] chan_skinny.c: Configuring skinny from skinny.conf [Apr 23 12:39:14] NOTICE[5208] pbx_ael.c: Starting AEL load process. |
#~
[Apr 23 12:39:14] NOTICE[5208] cdr.c: CDR simple logging enabled. [Apr 23 12:39:14] NOTICE[5208] loader.c: 198 modules will be loaded. [Apr 23 12:39:14] NOTICE[5208] res_odbc.c: res_odbc loaded. [Apr 23 12:39:14] NOTICE[5208] config.c: Registered Config Engine sqlite [Apr 23 12:39:14] NOTICE[5208] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener. [Apr 23 12:39:14] WARNING[5208] res_config_ldap.c: No directory user found, anonymous binding as default. [Apr 23 12:39:14] ERROR[5208] res_config_ldap.c: No directory URL or host found. [Apr 23 12:39:14] NOTICE[5208] res_config_ldap.c: Cannot load LDAP RealTime driver. [Apr 23 12:39:14] ERROR[5208] chan_vpb.cc: No Voicetronix cards detected [Apr 23 12:39:14] ERROR[5208] ais/clm.c: Could not initialize cluster membership service: Try Again [Apr 23 12:39:14] WARNING[5208] translate.c: plc_samples 160 format f [Apr 23 12:39:14] NOTICE[5208] chan_skinny.c: Configuring skinny from skinny.conf [Apr 23 12:39:14] NOTICE[5208] pbx_ael.c: Starting AEL load process. |
#[1002]
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#[1002]
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -t
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -t
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze4, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze4 currently running on linux1 (pid = 1506) linux1*CLI> sip reload linux1*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline] linux1*CLI> Disconnected from Asterisk server |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze4, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze4 currently running on linux1 (pid = 1506) linux1*CLI> sip reload linux1*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline] linux1*CLI> Disconnected from Asterisk server |
#vim sip.conf
--- /tmp/l3-saved-2765.20389.23738 2012-04-23 15:57:11.000000000 +0300 +++ sip.conf 2012-04-23 15:57:33.000000000 +0300 @@ -1,5 +1,5 @@ [general] -contex = default +contex=default [1001] tyte=friend |
#[1002]
Asterisk 1.6.2.9-2+squeeze4, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze4 currently running on linux1 (pid = 1506) linux1*CLI> sip reload [Apr 23 15:57:37] WARNING[1548]: chan_sip.c:25298 reload_config: Section '1001' lacks type [Apr 23 15:57:37] WARNING[1548]: chan_sip.c:25298 reload_config: Section '1002' lacks type linux1*CLI> Disconnected from Asterisk server |
#[1002]
Asterisk 1.6.2.9-2+squeeze4, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze4 currently running on linux1 (pid = 1506) linux1*CLI> sip reload [Apr 23 15:57:37] WARNING[1548]: chan_sip.c:25298 reload_config: Section '1001' lacks type [Apr 23 15:57:37] WARNING[1548]: chan_sip.c:25298 reload_config: Section '1002' lacks type linux1*CLI> Disconnected from Asterisk server |
Время первой команды журнала | 11:10:35 2012- 4-23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:57:34 2012- 4-23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 30.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 16.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.78 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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