/l3/users/Prokop/sl-voip-2016-03/Asterisk1.Unix.SL/user :1 :2 |
|
$sudo arp
Address HWtype HWaddress Flags Mask Iface 192.168.10.1 ether 6c:62:6d:7a:c2:cc C eth0 |
$apd-cache
bash: apd-cache: command not found |
$apt-cache
apt 1.0.9.8.2 for amd64 compiled on Sep 15 2015 21:44:33 Usage: apt-cache [options] command apt-cache [options] showpkg pkg1 [pkg2 ...] apt-cache [options] showsrc pkg1 [pkg2 ...] apt-cache is a low-level tool used to query information from APT's binary cache files Commands: gencaches - Build both the package and source cache showpkg - Show some general information for a single package showsrc - Show source records ... policy - Show policy settings Options: -h This help text. -p=? The package cache. -s=? The source cache. -q Disable progress indicator. -i Show only important deps for the unmet command. -c=? Read this configuration file -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp See the apt-cache(8) and apt.conf(5) manual pages for more information. |
$apt-cache search dhcp
ahcpd - Ad-Hoc Configuration Protocol autodns-dhcp - Automatic DNS updates for DHCP avahi-autoipd - Avahi IPv4LL network address configuration daemon backuppc - high-performance, enterprise-grade system for backing up PCs batctl - B.A.T.M.A.N. advanced control and management tool bootp - server for the bootp protocol with DHCP support busybox - Tiny utilities for small and embedded systems udhcpc - Provides the busybox DHCP client implementation udhcpd - Provides the busybox DHCP server implementation connman - Intel Connection Manager daemon ... pxe - free PXE daemon python-pydhcplib - Python DHCP client/server library python-pypureomapi - ISC DHCP OMAPI protocol implementation in Python python-reconfigure - simple config file management library resolvconf - name server information handler whereami - Automatically reconfigure your (laptop) system for a new location wide-dhcpv6-client - DHCPv6 client for automatic IPv6 hosts configuration wide-dhcpv6-relay - DHCPv6 relay for automatic IPv6 hosts configuration wide-dhcpv6-server - DHCPv6 server for automatic IPv6 hosts configuration yersinia - Network vulnerabilities check software |
$sudo apt-get install isc-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: isc-dhcp-server-ldap The following NEW packages will be installed: isc-dhcp-server 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 381 kB of archives. After this operation, 864 kB of additional disk space will be used. ... (Reading database ... 146846 files and directories currently installed.) Preparing to unpack .../isc-dhcp-server_4.3.1-6+deb8u2_amd64.deb ... Unpacking isc-dhcp-server (4.3.1-6+deb8u2) ... Processing triggers for systemd (215-17+deb8u3) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up isc-dhcp-server (4.3.1-6+deb8u2) ... Generating /etc/default/isc-dhcp-server... Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details. invoke-rc.d: initscript isc-dhcp-server, action "start" failed. Processing triggers for systemd (215-17+deb8u3) ... |
$apt-cache search bash-comp
bash - GNU Bourne Again SHell bash-completion - programmable completion for the bash shell python-optcomplete - provide bash-completion for Python programs |
$apt-get install bash-completion
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? |
$sudo apt-get install bash-completion
Reading package lists... Done Building dependency tree Reading state information... Done bash-completion is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
$sudo apt-get install bash
bash bashburn bash-doc bash-builtins bash-completion bash-static |
$sudo apt-get install bash
bash bashburn bash-doc bash-builtins bash-completion bash-static |
$sudo apt-get install dhcp
dhcpcd5 dhcpcd-gtk dhcp-helper dhcp-probe dhcpcd-dbus dhcpdump dhcping dhcpy6d |
$sudo apt-get install dhcp
dhcpcd5 dhcpcd-gtk dhcp-helper dhcp-probe dhcpcd-dbus dhcpdump dhcping dhcpy6d |
$sudo apt-get install isc
isc-dhcp-client isc-dhcp-dev isc-dhcp-server-dbg isc-dhcp-client-dbg isc-dhcp-relay isc-dhcp-server-ldap isc-dhcp-common isc-dhcp-relay-dbg iscsitarget isc-dhcp-dbg isc-dhcp-server iscsitarget-dkms |
$su
Password: |
#apt-
apt-cache apt-ftparchive apt-mark apt-cdrom apt-get apt-sortpkgs apt-config apt-key apt-extracttemplates apt-listchanges |
#apt-
apt-cache apt-ftparchive apt-mark apt-cdrom apt-get apt-sortpkgs apt-config apt-key apt-extracttemplates apt-listchanges |
#apt-
apt-cache apt-ftparchive apt-mark apt-cdrom apt-get apt-sortpkgs apt-config apt-key apt-extracttemplates apt-listchanges |
#apt-
apt-cache apt-ftparchive apt-mark apt-cdrom apt-get apt-sortpkgs apt-config apt-key apt-extracttemplates apt-listchanges |
#apt-
apt-cache apt-ftparchive apt-mark apt-cdrom apt-get apt-sortpkgs apt-config apt-key apt-extracttemplates apt-listchanges |
#apt-
apt-cache apt-ftparchive apt-mark apt-cdrom apt-get apt-sortpkgs apt-config apt-key apt-extracttemplates apt-listchanges |
#apt-
apt-cache apt-ftparchive apt-mark apt-cdrom apt-get apt-sortpkgs apt-config apt-key apt-extracttemplates apt-listchanges |
#apt-vim /etc/lilalo/l3config.pm
bash: apt-vim: command not found |
#vim /etc/lilalo/l3config.pm
|
$dpkg -l isc
isc-dhcp-client isc-dhcp-dev isc-dhcp-server-dbg isc-dhcp-client-dbg isc-dhcp-relay isc-dhcp-server-ldap isc-dhcp-common isc-dhcp-relay-dbg iscsitarget isc-dhcp-dbg isc-dhcp-server iscsitarget-dkms |
$dpkg -l isc-dhcp-server
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii isc-dhcp-serve 4.3.1-6+deb8 amd64 ISC DHCP server for automatic IP |
$dpkg -l isc-dhcp-server
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii isc-dhcp-serve 4.3.1-6+deb8 amd64 ISC DHCP server for automatic IP |
$sudo dpkg -l isc-dhcp-server
[sudo] password for user: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii isc-dhcp-serve 4.3.1-6+deb8 amd64 ISC DHCP server for automatic IP |
$sudo dpkg -L isc-dhcp-server
/. /etc /etc/init.d /etc/init.d/isc-dhcp-server /etc/dhcp /etc/dhcp/dhcpd.conf /usr /usr/share /usr/share/man /usr/share/man/man8 ... /usr/share/doc/isc-dhcp-server/examples /usr/share/doc/isc-dhcp-server/examples/dhcpd.conf.example /usr/share/doc/isc-dhcp-server/copyright /usr/share/doc/isc-dhcp-server/README.Debian /usr/sbin /usr/sbin/dhcpd /usr/sbin/dhcp-lease-list /var /var/lib /var/lib/dhcp |
$sudo dpkg -L isc-dhcp-server | grep /etc
/etc /etc/init.d /etc/init.d/isc-dhcp-server /etc/dhcp /etc/dhcp/dhcpd.conf |
$~
|
$~
|
$~
#subnet 10.254.239.32 netmask 255.255.255.224 { # range dynamic-bootp 10.254.239.40 10.254.239.60; # option broadcast-address 10.254.239.31; # option routers rtr-239-32-1.example.org; #} # A slightly different configuration for an internal subnet. #subnet 10.254.239.32 netmask 255.255.255.224 { # range dynamic-bootp 10.254.239.40 10.254.239.60; # option broadcast-address 10.254.239.31; # option routers rtr-239-32-1.example.org; ... ddns-update-style none; # option definitions common to all supported networks... option domain-name "unix.sl"; option domain-name-servers 8.8.8.8; default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also |
$-- INSERT -- 23,1 Top
#subnet 192.168.10.0 netmask 255.255.255.0 { #} #} # This is a very basic subnet declaration. # option broadcast-address 10.254.239.31; subnet 192.168.10.0 netmask 255.255.255.0 { range 192.168.10.200 192.168.10.250; option routers 192.168.10.1; # } # A slightly different configuration for an internal subnet. #subnet 10.5.5.0 netmask 255.255.255.224 { # range 10.5.5.26 10.5.5.30; # option domain-name-servers ns1.internal.example.org; "/etc/dhcp/dhcpd.conf" 107L, 3423C written |
$sudo dpkg -L isc-dhcp-server | grep /etc
/etc /etc/init.d /etc/init.d/isc-dhcp-server /etc/dhcp /etc/dhcp/dhcpd.conf |
$sudo dpkg -L isc-dhcp-server | grep /etc
/etc /etc/init.d /etc/init.d/isc-dhcp-server /etc/dhcp /etc/dhcp/dhcpd.conf |
$sudo service isc-dhcp-server restart
|
$ps aux |grep dhcp
root 3275 0.0 0.1 28488 9500 ? Ss 11:57 0:00 /usr/sbin/dhcpd -q -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid user 3286 0.0 0.0 12728 2108 pts/1 S+ 11:57 0:00 grep dhcp |
$ls /var/lib/dhcp/dhcpd.leases
/var/lib/dhcp/dhcpd.leases |
$sudo cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\362T\004\246\277Q("; lease 192.168.10.200 { starts 2 2016/03/29 08:58:11; ends 2 2016/03/29 09:08:11; cltt 2 2016/03/29 08:58:11; binding state active; next binding state free; rewind binding state free; hardware ethernet 40:6c:8f:59:a3:e5; uid "\001@l\217Y\243\345"; client-hostname "MBP-Andrei"; } |
$sudo apt-get install nmap
Reading package lists... Done Building dependency tree Reading state information... Done nmap is already the newest version. nmap set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
$nmap
Nmap 6.47 ( http://nmap.org ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254 -iL <inputfilename>: Input from list of hosts/networks -iR <num hosts>: Choose random targets --exclude <host1[,host2][,host3],...>: Exclude hosts/networks --excludefile <exclude_file>: Exclude list from file HOST DISCOVERY: ... --send-eth/--send-ip: Send using raw ethernet frames or IP packets --privileged: Assume that the user is fully privileged --unprivileged: Assume the user lacks raw socket privileges -V: Print version number -h: Print this help summary page. EXAMPLES: nmap -v -A scanme.nmap.org nmap -v -sn 192.168.0.0/16 10.0.0.0/8 nmap -v -iR 10000 -Pn -p 80 SEE THE MAN PAGE (http://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES |
$nmap -p 22
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:04 MSK WARNING: No targets were specified, so 0 hosts scanned. Nmap done: 0 IP addresses (0 hosts up) scanned in 0.05 seconds |
$nmap
Nmap 6.47 ( http://nmap.org ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254 -iL <inputfilename>: Input from list of hosts/networks -iR <num hosts>: Choose random targets --exclude <host1[,host2][,host3],...>: Exclude hosts/networks --excludefile <exclude_file>: Exclude list from file HOST DISCOVERY: ... --send-eth/--send-ip: Send using raw ethernet frames or IP packets --privileged: Assume that the user is fully privileged --unprivileged: Assume the user lacks raw socket privileges -V: Print version number -h: Print this help summary page. EXAMPLES: nmap -v -A scanme.nmap.org nmap -v -sn 192.168.0.0/16 10.0.0.0/8 nmap -v -iR 10000 -Pn -p 80 SEE THE MAN PAGE (http://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES |
$nmap -p22 192.168.10.0/24
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:05 MSK Nmap scan report for 192.168.10.1 Host is up (0.00021s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for Asterisk1.Unix.SL (192.168.10.2) Host is up (0.00015s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for 192.168.10.200 Host is up (0.00047s latency). PORT STATE SERVICE 22/tcp closed ssh Nmap done: 256 IP addresses (3 hosts up) scanned in 2.52 seconds |
$arp
bash: arp: command not found |
$sudo arp
Address HWtype HWaddress Flags Mask Iface 192.168.10.1 ether 6c:62:6d:7a:c2:cc C eth0 192.168.10.200 ether 40:6c:8f:59:a3:e5 C eth0 |
$sudo arp -an
? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -an
? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$vim ~//vimrc
--- /dev/null 2016-03-29 10:00:50.844405414 +0300 +++ /home/user//vimrc 2016-03-29 12:10:51.312887891 +0300 @@ -0,0 +1 @@ +syn on |
$vim ~//vimrc
|
$~
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\362T\004\246\277Q("; lease 192.168.10.200 { starts 2 2016/03/29 08:58:11; ends 2 2016/03/29 09:08:11; cltt 2 2016/03/29 08:58:11; binding state active; next binding state free; rewind binding state free; ... starts 2 2016/03/29 09:03:11; ends 2 2016/03/29 11:03:11; cltt 2 2016/03/29 09:03:11; binding state active; next binding state free; rewind binding state free; hardware ethernet 40:6c:8f:59:a3:e5; uid "\001@l\217Y\243\345"; client-hostname "MBP-Andrei"; } |
$ rewind binding state free;
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm asterisk-modules asterisk-moh-opsound-gsm asterisk-voicemail freetds-common libcfg4 libcoroipcc4 libcpg4 libfreeradius-client2 libiksemel3 libodbc1 libpj2 libpjlib-util2 libpjmedia-audiodev2 libpjmedia-codec2 libpjmedia-videodev2 libpjmedia2 libpjnath2 libpjsip-simple2 libpjsip-ua2 libpjsip2 libpjsua2 libpq5 libresample1 libsensors4 libsnmp-base libsnmp30 ... Adding user `asterisk' to group `audio' ... Adding user asterisk to group audio Done. Setting up asterisk-voicemail (1:11.13.1~dfsg-2+b1) ... Setting up libsox-fmt-alsa:amd64 (14.4.1-5) ... Setting up libsox-fmt-base:amd64 (14.4.1-5) ... Setting up sox (14.4.1-5) ... Setting up asterisk-moh-opsound-gsm (2.03-1) ... Processing triggers for libc-bin (2.19-18+deb8u2) ... Processing triggers for systemd (215-17+deb8u3) ... |
$sudo dpkg asterisk | less
|
$sudo dpkg asterisk
[sudo] password for user: dpkg: error: need an action option Type dpkg --help for help about installing and deinstalling packages [*]; Use 'apt' or 'aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files; Options marked [*] produce a lot of output - pipe it through 'less' or 'more' ! |
$sudo dpkg -l asterisk
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii asterisk 1:11.13.1~df amd64 Open Source Private Branch Exchan |
$sudo dpkg -L asterisk
/. /var /var/lib /var/lib/asterisk /var/lib/asterisk/moh /var/lib/asterisk/sounds /var/lib/asterisk/sounds/custom /var/spool /var/spool/asterisk /var/spool/asterisk/dictate ... /usr/sbin/astgenkey /usr/sbin/smsq /usr/sbin/aelparse /usr/sbin/autosupport /usr/sbin/astdb2sqlite3 /usr/sbin/astdb2bdb /usr/share/asterisk/sounds/recordings /usr/share/asterisk/sounds/custom /usr/share/man/man8/rasterisk.8.gz /usr/sbin/rasterisk |
$sudo dpkg -L asterisk | less
|
$sudo dpkg -L asterisk | less
|
$sudo apt-get install asterisk-
asterisk-config asterisk-modules asterisk-core-sounds-en asterisk-moh-opsound-g722 asterisk-core-sounds-en-g722 asterisk-moh-opsound-gsm asterisk-core-sounds-en-gsm asterisk-moh-opsound-wav asterisk-core-sounds-en-wav asterisk-mp3 asterisk-core-sounds-es asterisk-mysql asterisk-core-sounds-es-g722 asterisk-ooh323 asterisk-core-sounds-es-gsm asterisk-prompt-de asterisk-core-sounds-es-wav asterisk-prompt-es-co asterisk-core-sounds-fr asterisk-prompt-fr-armelle ... asterisk-core-sounds-fr-wav asterisk-prompt-it-menardi asterisk-core-sounds-ru asterisk-prompt-it-menardi-alaw asterisk-core-sounds-ru-g722 asterisk-prompt-it-menardi-gsm asterisk-core-sounds-ru-gsm asterisk-prompt-it-menardi-wav asterisk-core-sounds-ru-wav asterisk-prompt-se asterisk-dahdi asterisk-testsuite asterisk-dbg asterisk-voicemail asterisk-dev asterisk-voicemail-imapstorage asterisk-doc asterisk-voicemail-odbcstorage asterisk-mobile asterisk-vpb |
$sudo apt-get install asterisk-dahdi
[sudo] password for user: Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dahdi dahdi-linux fxload libopenr2-3 libpri1.4 libss7-1 libtonezone2.0 The following NEW packages will be installed: asterisk-dahdi dahdi dahdi-linux fxload libopenr2-3 libpri1.4 libss7-1 libtonezone2.0 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. ... Processing triggers for systemd (215-17+deb8u3) ... Setting up fxload (0.0.20081013-1) ... Setting up dahdi-linux (1:2.10.0.1~dfsg-1) ... Setting up dahdi (1:2.10.0.1-1) ... Setting up libopenr2-3 (1.3.3-1) ... Setting up libpri1.4 (1.4.15-1) ... Setting up libss7-1 (1.0.2-5) ... Setting up libtonezone2.0:amd64 (1:2.10.0.1-1) ... Setting up asterisk-dahdi (1:11.13.1~dfsg-2+b1) ... Processing triggers for libc-bin (2.19-18+deb8u2) ... |
$sudo mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf/saved
[sudo] password for user: mv: failed to access ‘/etc/asterisk/sip.conf/saved’: Not a directory |
$sudo mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf.saved
|
$vim ~/.vimrc
--- /tmp/l3-saved-5342.5843.6849 2016-03-29 14:24:25.296852743 +0300 +++ /home/user/.vimrc 2016-03-29 14:24:53.132852621 +0300 @@ -1,2 +1,2 @@ -syn on +sym on |
$sudo vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5342.9199.13789 2016-03-29 14:27:58.328851809 +0300 +++ /home/user/.vimrc 2016-03-29 14:28:11.860851749 +0300 @@ -1,2 +1 @@ -sym on - +syn on |
$asterisk -r
bash: asterisk: command not found |
$sudo asterisk -r
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on Asterisk1 (pid = 5188) Asterisk1*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline] Asterisk1*CLI> sip reload Asterisk1*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 1101 (Unspecified) D Auto (No) No 0 Unmonitored 1102 (Unspecified) D Auto (No) No 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] Asterisk1*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo arp -a
[sudo] password for user: ? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at <incomplete> on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at 00:0e:08:d7:42:26 [ether] on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at 00:0e:08:d7:42:26 [ether] on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at 00:0e:08:d7:42:26 [ether] on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at 00:0e:08:d7:42:26 [ether] on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo arp -a
? (192.168.10.201) at 00:0e:08:d7:42:26 [ether] on eth0 ? (192.168.10.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.10.200) at 40:6c:8f:59:a3:e5 [ether] on eth0 |
$sudo vim /etc/asterisk/extensions.conf
|
$~
exten => 4000,1,Playba(kvar/tmp/asterisk/message01:gsm) ~ exten => 4001,1,Record gsm ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/extensions.conf" 7L, 108C written |
$sudo vim /etc/asterisk/extensions.conf
|
$~
|
$chown asterisk:asterisk /var/tmp/asterisk/
chown: changing ownership of ‘/var/tmp/asterisk/’: Operation not permitted |
$sudo chown asterisk:asterisk /var/tmp/asterisk/
|
$ls /var/tmp/asterisk/
|
$sudo ls /var/tmp/asterisk/
|
$sudo ls /var/tmp/asterisk/
|
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\362T\004\246\277Q("; lease 192.168.10.200 { starts 2 2016/03/29 08:58:11; ends 2 2016/03/29 09:08:11; cltt 2 2016/03/29 08:58:11; binding state active; next binding state free; rewind binding state free; hardware ethernet 40:6c:8f:59:a3:e5; uid "\001@l\217Y\243\345"; client-hostname "MBP-Andrei"; }
Время первой команды журнала | 10:18:04 2016- 3-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:16:17 2016- 3-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 6.93 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.55 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.66 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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