/l3/users/slm/2018-12-minsk-aws/student02.BigClassRoom/user :1 |
|
$ssh 172.20.13.183
inet 172.20.13.183/25 brd 172.20.13.255 scope global dynamic enp3s0 valid_lft 690907sec preferred_lft 690907sec inet6 fe80::3285:a9ff:fe9e:10aa/64 scope link valid_lft forever preferred_lft forever [user@instructor:~]$ [user@instructor:~]$ [user@instructor:~]$ [user@instructor:~]$ l bash: l: command not found [user@instructor:~]$ scpu bash: scpu: command not found |
$free
total used free shared buff/cache available Mem: 8143996 675336 6838416 145808 630244 7088092 Swap: 8351740 0 8351740 |
$su
Password: su: Authentication failure |
$:/home/user# vi /etc/sudoers
bash: :/home/user#: No such file or directory |
$vim
i |
$~
bash: :/home/user#vim: No such file or directory |
$su
# User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL user ALL=(ALL:ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d root@m2:/home/user# exit |
$sudo dmidecode
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for user: # dmidecode 3.0 Getting SMBIOS data from sysfs. SMBIOS 2.5 present. 46 structures occupying 1824 bytes. ... OEM-specific Type Header and Data: 8B 36 2C 00 07 10 22 01 00 00 00 20 04 04 32 55 F8 00 A2 02 A1 00 40 63 43 10 EB 82 03 DF 40 B2 00 20 00 73 3C 10 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 Strings: V1394GUID Handle 0x002D, DMI type 127, 4 bytes End Of Table |
$vi ~/.bashrc
|
$. /etc/bash_completion
|
$sudo dmidecode
# dmidecode 3.0 Getting SMBIOS data from sysfs. SMBIOS 2.5 present. 46 structures occupying 1824 bytes. Table at 0x000F06D0. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: American Megatrends Inc. Version: 0405 Release Date: 11/22/2010 ... OEM-specific Type Header and Data: 8B 36 2C 00 07 10 22 01 00 00 00 20 04 04 32 55 F8 00 A2 02 A1 00 40 63 43 10 EB 82 03 DF 40 B2 00 20 00 73 3C 10 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 Strings: V1394GUID Handle 0x002D, DMI type 127, 4 bytes End Of Table |
$sudo apt-get install hdpar
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package hdpar |
$sudo apt-get install hdparm
Reading package lists... Done Building dependency tree Reading state information... Done hdparm is already the newest version (9.51+ds-1+deb9u1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
$cat /proc/patitios
cat: /proc/patitios: No such file or directory |
$cat /proc/patitions
cat: /proc/patitions: No such file or directory |
$cat /proc/partitions
major minor #blocks name 11 0 1048575 sr0 8 0 244198584 sda 8 1 235844608 sda1 8 2 1 sda2 8 5 8351744 sda5 |
$df -h
Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 796M 18M 779M 3% /run /dev/sda1 221G 4.2G 205G 2% / tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup tmpfs 796M 16K 796M 1% /run/user/117 tmpfs 796M 40K 796M 1% /run/user/1001 |
$hdparm -tT /dev/sda
bash: hdparm: command not found |
$sudo hdparm -tT /dev/sda
/dev/sda: Timing cached reads: 3534 MB in 2.00 seconds = 1767.92 MB/sec Timing buffered disk reads: 272 MB in 3.02 seconds = 90.04 MB/sec |
$sudo apt-get install curl
[sudo] password for user: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libcurl3 The following NEW packages will be installed: curl libcurl3 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 519 kB of archives. ... (Reading database ... 135979 files and directories currently installed.) Preparing to unpack .../libcurl3_7.52.1-5+deb9u8_amd64.deb ... Unpacking libcurl3:amd64 (7.52.1-5+deb9u8) ... Selecting previously unselected package curl. Preparing to unpack .../curl_7.52.1-5+deb9u8_amd64.deb ... Unpacking curl (7.52.1-5+deb9u8) ... Setting up libcurl3:amd64 (7.52.1-5+deb9u8) ... Processing triggers for libc-bin (2.24-11+deb9u3) ... Processing triggers for man-db (2.7.6.1-2) ... Setting up curl (7.52.1-5+deb9u8) ... |
$curl cheat.sh/ls
# Displays everything in the target directory ls path/to/the/target/directory # Displays everything including hidden files ls -a # Displays all files, along with the size (with unit suffixes) and timestamp ls -lh # Display files, sorted by size ls -S # Display directories only ls -d */ # Display directories only, include hidden ls -d .*/ */ |
$curl cheat.sh/df
# Printout disk free space in a human readable format df -h # Disk free space for ext2 file systems df -t ext2 # Disk free space for file systems except ext2 df -x ext2 # Show inode usage df -i # Show information about a distinct file system /path df /path |
$curl cheat.sh/wget
# To download a single file wget http://path.to.the/file # To download a file and change its name wget http://path.to.the/file -O newname # To download a file into a directory wget -P path/to/directory http://path.to.the/file # To continue an aborted downloaded wget -c http://path.to.the/file # To download multiples files with multiple URLs wget URL1 URL2 ... # To mirror a whole site locally wget -mk http://site.tl/ # To download files according to a pattern wget http://www.myserver.com/files-{1..15}.tar.bz2 # To download all the files in a directory with a specific extension if directory indexing is enabled wget -r -l1 -A.extension http://myserver.com/directory # Allows you to download just the headers of responses (-S --spider) and display them on Stdout (-O -). wget -S --spider -O - http://google.com # Change the User-Agent to 'User-Agent: toto' wget -U 'toto' http://google.com |
$curl de.wttr.in?2|less
|
$curl de.wttr.in?2|less -R
|
$sudo apt-get install git-core
Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: git git-man liberror-perl rsync Suggested packages: git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn The following NEW packages will be installed: git git-core git-man liberror-perl rsync ... Preparing to unpack .../rsync_3.1.2-1+deb9u1_amd64.deb ... Unpacking rsync (3.1.2-1+deb9u1) ... Setting up git-man (1:2.11.0-3+deb9u4) ... Setting up liberror-perl (0.17024-1) ... Setting up rsync (3.1.2-1+deb9u1) ... Created symlink /etc/systemd/system/multi-user.target.wants/rsync.service → /lib/systemd/system/rsync.service. Processing triggers for systemd (232-25+deb9u6) ... Processing triggers for man-db (2.7.6.1-2) ... Setting up git (1:2.11.0-3+deb9u4) ... Setting up git-core (1:2.11.0-3+deb9u4) ... |
$cat github.txt
cat: github.txt: No such file or directory |
$touch github.txt
|
$vi github.txt
|
$cat github.txt
tatyanazhitnik |
$git clone https://github.com/tatyanazhitnik/AWS
Cloning into 'AWS'... warning: You appear to have cloned an empty repository. |
$ls
AWS Documents github.txt Pictures Templates Desktop Downloads Music Public Videos |
$cd AWS
|
$vim hello.md
|
$git add hello.md
|
$git status
On branch master Initial commit Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: hello.md |
$git commit -m 'added hello.md' hello.md
*** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <(null)>) not allowed |
$git config --global user.email "tatsianazhytnik@gmail.com"
|
$git config --global user.name "tatyanazhitik"
|
$git log
commit 915d1ea4484fad26b5194fe94fda7d1fdb1433a3 Author: tatyanazhitik <tatsianazhytnik@gmail.com> Date: Mon Dec 17 16:16:00 2018 +0300 added hello.md |
$git status
On branch master Your branch is based on 'origin/master', but the upstream is gone. (use "git branch --unset-upstream" to fixup) nothing to commit, working tree clean |
$git push
Username for 'https://github.com': tatyanazhitnik Password for 'https://tatyanazhitnik@github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/tatyanazhitnik/AWS/' |
$git push
Username for 'https://github.com': tatyanazhitnik Password for 'https://tatyanazhitnik@github.com': Counting objects: 3, done. Writing objects: 100% (3/3), 224 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To https://github.com/tatyanazhitnik/AWS * [new branch] master -> master |
$git pool
git: 'pool' is not a git command. See 'git --help'. Did you mean this? pull |
$git pull
remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (3/3), done. From https://github.com/tatyanazhitnik/AWS 915d1ea..e5bcc3a master -> origin/master Updating 915d1ea..e5bcc3a Fast-forward hello.md | 1 + 1 file changed, 1 insertion(+) |
$git dif
git: 'dif' is not a git command. See 'git --help'. Did you mean one of these? diff config difftool init |
$git diff
|
$git status
On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working tree clean |
$ssh 172.20.13.183
[user@instructor:~]$ [user@instructor:~]$ [user@instructor:~]$ /sbin/ifconfig inet 172.20.13.183 netmask 255.255.255.128 broadcast 172.20.13.255 enp3s0: inet6 fe80::3285:a9ff:fe9e:10aa prefixlen 64 scopeid 0x20<link> ether 30:85:a9:9e:10:aa txqueuelen 1000 (Ethernet) RX packets 1276 bytes 451436 (440.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 840 bytes 99708 (97.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ... loop txqueuelen 1 (Local Loopback) RX packets 231 bytes 42292 (41.3 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [user@instructor:~]$ [user@instructor:~]$ [user@instructor:~]$ [user@instructor:~]$ -------------------------------------------------------------------------------- # www.yasiv.com/github/ |
$~
|
$vim test.yaml
|
$~
Already up-to-date. |
$rm test.yaml
|
$ls
hello.md |
$cd
|
$vim credentials.csv
|
$~
Password: root@m2:~# cat credentials.csv user2,E1fVbZJU=L!E,AKIAJY2TXNELANISTNRA,rLrvUVNYZEa1xxfMT5cUlPITGAz4gozGwrdJfC1n,https://chubin.signin.aws.amazon.com/console root@m2:~# curl cheat.sh/latencies # Latency numbers every programmer should know 1ns Main memory reference: Send 2,000 bytes Read 1,000,000 bytes ▗▖ 100ns over commodity network: sequentially from SSD: 77us ▗▖ 88ns ▗ L1 cache reference: 1ns ▗ ▗▖ 1us Disk seek: 2ms ... -rw-r--r-- 1 root root 0 Dec 16 14:33 .hushlogin -rw-r--r-- 1 root root 5295 Dec 16 14:19 install -rw-r--r-- 1 root root 62 Dec 16 14:23 .l3rc drwxr-xr-x 2 root root 4096 Dec 18 10:52 .lilalo -rw-r--r-- 1 root root 5295 Dec 16 14:22 lilalo-install -rw-r--r-- 1 root root 148 Aug 17 2015 .profile -rwxr-xr-x 1 root root 66 Dec 16 14:02 setpasswd drwxr-xr-x 2 root root 4096 Dec 16 12:53 .ssh -rw------- 1 root root 4748 Dec 17 12:37 .viminfo root@m2:~# logout |
$mv ~/Downloads/user2.pem ~/.ssh/
|
$cat user2.pem
cat: user2.pem: No such file or directory |
$cd /.ssh
bash: cd: /.ssh: No such file or directory |
$vim ~/.ssh/config
|
$ User ec2-user
|
$ssh 54.171.128.141
The authenticity of host '54.171.128.141 (54.171.128.141)' can't be established. ECDSA key fingerprint is SHA256:kgTswwIkR/wVagkZ6RNkr+o6XOLuLyhZod0THuYa8TE. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no': yes Warning: Permanently added '54.171.128.141' (ECDSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh ec2-54-171-128-141.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-54-171-128-141.eu-west-1.compute.amazonaws.com (54.171.128.141)' can't be established. ECDSA key fingerprint is SHA256:kgTswwIkR/wVagkZ6RNkr+o6XOLuLyhZod0THuYa8TE. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-54-171-128-141.eu-west-1.compute.amazonaws.com' (ECDSA) to the list of known hosts. __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 1 package(s) needed for security, out of 5 available Run "sudo yum update" to apply all updates. ... Installed: hdparm.x86_64 0:9.43-5.amzn2.0.2 Complete! [ec2-user@ip-10-1-1-221 ~]$ sudo hdparm -tT /dev/xvda /dev/xvda: Timing cached reads: 20544 MB in 1.99 seconds = 10312.53 MB/sec Timing buffered disk reads: 246 MB in 3.03 seconds = 81.14 MB/sec [ec2-user@ip-10-1-1-221 ~]$ exit logout Connection to ec2-54-171-128-141.eu-west-1.compute.amazonaws.com closed. |
$ssh ec2-52-31-249-124.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-52-31-249-124.eu-west-1.compute.amazonaws.com (52.31.249.124)' can't be established. ECDSA key fingerprint is SHA256:xsSlFZg7bvULFchQ/2doO3qMm7UPUdGG0pNkyLH2PfI. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-52-31-249-124.eu-west-1.compute.amazonaws.com,52.31.249.124' (ECDSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh ec2-52-31-249-124.eu-west-1.compute.amazonaws.com
Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh 52.31.249.124
Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh ec2-52-48-225-79.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-52-48-225-79.eu-west-1.compute.amazonaws.com (52.48.225.79)' can't be established. ECDSA key fingerprint is SHA256:b+0iVZyiDkP9WG0SAC8eIgAen4vuU1Y31XzM0XlzBAI. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-52-48-225-79.eu-west-1.compute.amazonaws.com,52.48.225.79' (ECDSA) to the list of known hosts. __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 1 package(s) needed for security, out of 5 available Run "sudo yum update" to apply all updates. ... [ ID] Interval Transfer Bandwidth [ 5] 0.00-10.05 sec 0.00 Bytes 0.00 bits/sec sender [ 5] 0.00-10.05 sec 1.17 GBytes 998 Mbits/sec receiver ----------------------------------------------------------- Server listening on 5201 ----------------------------------------------------------- ^Ciperf3: interrupt - the server has terminated [ec2-user@ip-10-1-1-175 ~]$ exit logout Connection to ec2-52-48-225-79.eu-west-1.compute.amazonaws.com closed. |
$ssh ec2-34-244-192-49.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-34-244-192-49.eu-west-1.compute.amazonaws.com (34.244.192.49)' can't be established. ECDSA key fingerprint is SHA256:LSxziG98i1aegeh1tcaPEctD3Rai+9hHT5pHcTlwl7k. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-34-244-192-49.eu-west-1.compute.amazonaws.com,34.244.192.49' (ECDSA) to the list of known hosts. __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-172-31-24-69 ~]$ Connection to ec2-34-244-192-49.eu-west-1.compute.amazonaws.com closed by remote host. Connection to ec2-34-244-192-49.eu-west-1.compute.amazonaws.com closed. |
$ssh 172.20.13.183
__| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-2-1-85 ~]$ exit logout Connection to ec2-34-244-157-202.eu-west-1.compute.amazonaws.com closed. |
$cat ~/m0_id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYGvcDYF6qANe1rMxpkjCidlqC7q6qx4tV/4CfOXDCS+jVeIzIqsfihsQ0q1ZBOZ+1WhUaUMUxsmOW6PQm1fXrvj/8iyfbCLJ5kFDsSe3z80GWhVv4Wt2LOmeKG6TqBWzI4572qQmWHBHA2AbCDA3Z9ZEjKXqPcgwcyDI7TPlZi7ngsAM9oSxWd+BZU8Jq3upxU5rWFDrfQO49bzzoxrTFiQTj/9upqP77byclZ4DNvHR1V1DgbM8iTRYJbbyn7G36Dn/B3Q+m4imJ6aGeCGXOgMpWuGO4XXVX5J4VLQXWcI6zVlYRnGWl/l0SSvPlEJ6AQ1E7VoNd2sAjsLSy0Ect user@instructor |
$ssh -keygen
Bad escape character 'ygen'. |
$ls .ssh
config known_hosts user2.pem |
$ls ./ssh
ls: cannot access './ssh': No such file or directory |
$ssh keygen
ssh: Could not resolve hostname keygen: Name or service not known |
$ssh
ssh ssh-agent ssh-copy-id ssh-keyscan ssh-add ssh-argv0 ssh-keygen |
$ssh-keygen
Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user/.ssh/id_rsa. Your public key has been saved in /home/user/.ssh/id_rsa.pub. The key fingerprint is: SHA256:rHGT1hNEEuhOzoruPh11z4PAevDa/B44fN47tyA3H4o user@m2 The key's randomart image is: +---[RSA 2048]----+ | .ooo | | . o | | o . | | . *..o . | | X.oS+o | | o.**..+. | | o B= + +.. | | o + o+ *.=.. | | ++. oE ++o. | +----[SHA256]-----+ |
$scp .ssh/id_rsa.pub m3:~/m2_id_rsa.pub
The authenticity of host 'm3 (172.20.13.189)' can't be established. ECDSA key fingerprint is SHA256:rPDJPvc+lz3cxz2KjCqU1ABB/MPL1qiQ/GBwUxPCjMw. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'm3,172.20.13.189' (ECDSA) to the list of known hosts. user@m3's password: id_rsa.pub 100% 389 1.1MB/s 00:00 |
$ls ~/.ssh
config id_rsa id_rsa.pub known_hosts user2.pem |
$scp .ssh/id_rsa.pub m3:~/.ssh/m2_id_rsa.pub
user@m3's password: id_rsa.pub 100% 389 1.2MB/s 00:00 |
$ls -
ls: cannot access '-': No such file or directory |
$ls -la ./ssh
ls: cannot access './ssh': No such file or directory |
$ls -la .ssh/
total 28 drwx------ 2 user user 4096 Dec 19 10:57 . drwxr-xr-x 18 user user 4096 Dec 19 10:59 .. -rw-r--r-- 1 user user 75 Dec 18 12:59 config -rw------- 1 user user 1766 Dec 19 10:57 id_rsa -rw-r--r-- 1 user user 389 Dec 19 10:57 id_rsa.pub -rw-r--r-- 1 user user 2442 Dec 19 10:59 known_hosts -rw------- 1 user user 1696 Dec 18 12:49 user2.pem |
$ls -la
total 140 drwxr-xr-x 18 user user 4096 Dec 19 10:59 . drwxr-xr-x 4 root root 4096 Dec 16 14:01 .. drwxr-xr-x 3 user user 4096 Dec 18 10:29 AWS -rw------- 1 user user 1710 Dec 19 10:57 .bash_history -rw-r--r-- 1 user user 220 May 15 2017 .bash_logout -rw-r--r-- 1 user root 10 Dec 16 14:20 .bash_profile -rw-r--r-- 1 user user 636 Dec 17 12:43 .bashrc drwx------ 7 user user 4096 Dec 17 15:09 .cache drwx------ 9 user user 4096 Dec 17 12:15 .config ... -rw-r--r-- 1 user user 389 Dec 19 10:55 m3_id_rsa.pub drwx------ 5 user user 4096 Dec 17 15:09 .mozilla drwxr-xr-x 2 user user 4096 Dec 17 12:15 Music drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -rw-r--r-- 1 user user 675 May 15 2017 .profile drwxr-xr-x 2 user user 4096 Dec 17 12:15 Public drwx------ 2 user user 4096 Dec 19 10:57 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7457 Dec 18 12:59 .viminfo |
$ls -la | grep m3
-rw-r--r-- 1 user user 389 Dec 19 10:55 m3_id_rsa.pub |
$ls -la .ssh/
total 32 drwx------ 2 user user 4096 Dec 19 11:04 . drwxr-xr-x 18 user user 4096 Dec 19 10:59 .. -rw-r--r-- 1 user user 75 Dec 18 12:59 config -rw------- 1 user user 1766 Dec 19 10:57 id_rsa -rw-r--r-- 1 user user 389 Dec 19 10:57 id_rsa.pub -rw-r--r-- 1 user user 2442 Dec 19 10:59 known_hosts -rw-r--r-- 1 user user 389 Dec 19 11:04 m3_id_rsa.pub -rw------- 1 user user 1696 Dec 18 12:49 user2.pem |
$ls .ssh/
config id_rsa id_rsa.pub known_hosts m3_id_rsa.pub user2.pem |
$ssh m3
user@m3's password: Linux m3 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. user@m3:~$ more Readme.txt at .ssh/id_rsa.pub | ssh ec2-34-244-157-202.eu-west-1.compute.amazonaws.com 'cat >> ~/.ssh/authorized_keys' user@m3:~$ logout Connection to m3 closed. |
$cat V
ValeryDNS.txt Videos/ |
$cat ValeryDNS.txt
ec2-18-202-250-151.eu-west-1.compute.amazonaws.com |
$ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-18-202-250-151.eu-west-1.compute.amazonaws.com (18.202.250.151)' can't be established. ECDSA key fingerprint is SHA256:n74nJdPD3sIdmafbsw0i2Nd8Op1YcMiqyP7Uwd5Z1So. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-18-202-250-151.eu-west-1.compute.amazonaws.com,18.202.250.151' (ECDSA) to the list of known hosts. sign_and_send_pubkey: signing failed: agent refused operation Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com
__| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-1-1-153 ~]$ logout Connection to ec2-18-202-250-151.eu-west-1.compute.amazonaws.com closed. |
$ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com
Last login: Wed Dec 19 08:16:21 2018 from port-90-adslby-pool35.infonet.by __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-1-1-153 ~]$ logout Connection to ec2-18-202-250-151.eu-west-1.compute.amazonaws.com closed. |
major minor #blocks name 11 0 1048575 sr0 8 0 244198584 sda 8 1 235844608 sda1 8 2 1 sda2 8 5 8351744 sda5
ValeryDNS.txt Videos/
ec2-18-202-250-151.eu-west-1.compute.amazonaws.com
tatyanazhitnik
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYGvcDYF6qANe1rMxpkjCidlqC7q6qx4tV/4CfOXDCS+jVeIzIqsfihsQ0q1ZBOZ+1WhUaUMUxsmOW6PQm1fXrvj/8iyfbCLJ5kFDsSe3z80GWhVv4Wt2LOmeKG6TqBWzI4572qQmWHBHA2AbCDA3Z9ZEjKXqPcgwcyDI7TPlZi7ngsAM9oSxWd+BZU8Jq3upxU5rWFDrfQO49bzzoxrTFiQTj/9upqP77byclZ4DNvHR1V1DgbM8iTRYJbbyn7G36Dn/B3Q+m4imJ6aGeCGXOgMpWuGO4XXVX5J4VLQXWcI6zVlYRnGWl/l0SSvPlEJ6AQ1E7VoNd2sAjsLSy0Ect user@instructor
Время первой команды журнала | 10:16:54 2018-12-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:18:58 2018-12-19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 30.61 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.06 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.39 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.48 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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