echo “DOCKER_OPTS=”$DOCKER_OPTS --registry-mirror=https://u9r348t0.mirror.aliyuncs.com"" | sudo tee -a /etc/default/docker sudo service docker restart
echo “DOCKER_OPTS=”$DOCKER_OPTS --registry-mirror=https://http://hub-mirror.c.163.com “” | sudo tee -a /etc/default/docker sudo service docker restart
apt install net-tools
jerry@jerry:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:f0:67:04 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute enp0s3
valid_lft 86332sec preferred_lft 86332sec
inet6 fe80::5e0a:35c5:37ce:4aa2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:7a:bf:80 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.101/24 brd 192.168.56.255 scope global dynamic noprefixroute enp0s8
valid_lft 1133sec preferred_lft 1133sec
inet6 fe80::9907:d3c3:13ad:6b10/64 scope link noprefixroute
valid_lft forever preferred_lft forever
jerry@jerry:~$ 192.168.56.102
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp6 0 0 ::1:631 ::😗 LISTEN -
udp 0 0 0.0.0.0:631 0.0.0.0:* -
udp 0 0 127.0.0.53:53 0.0.0.0:* -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:36106 0.0.0.0:* -
udp6 0 0 :::5353 ::😗 -
udp6 0 0 :::43324 ::😗 -
jerry@jerry:~$ sudo netstat -tulpn
[sudo] password for jerry:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 356/systemd-resolve
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 490/cupsd
tcp6 0 0 ::1:631 ::😗 LISTEN 490/cupsd
udp 0 0 0.0.0.0:631 0.0.0.0:* 592/cups-browsed
udp 0 0 127.0.0.53:53 0.0.0.0:* 356/systemd-resolve
udp 0 0 0.0.0.0:68 0.0.0.0:* 626/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 630/dhclient
udp 0 0 0.0.0.0:5353 0.0.0.0:* 514/avahi-daemon: r
udp 0 0 0.0.0.0:36106 0.0.0.0:* 514/avahi-daemon: r
udp6 0 0 :::5353 ::😗 514/avahi-daemon: r
udp6 0 0 :::43324 ::😗 514/avahi-daemon: r
jerry@jerry:~$ sudo apt install openssh-server
E: dpkg was interrupted, you must manually run ‘sudo dpkg --configure -a’ to correct the problem.
jerry@jerry:~$ sudo dpkg --configure -a
Setting up python3.6 (3.6.8-1~18.04.3) …
Setting up gir1.2-webkit2-4.0:amd64 (2.24.4-0ubuntu0.18.04.1) …
Setting up libirs160:amd64 (1:9.11.3+dfsg-1ubuntu1.9) …
Setting up libbind9-160:amd64 (1:9.11.3+dfsg-1ubuntu1.9) …
Setting up cups-ppdc (2.2.7-1ubuntu2.7) …
Setting up snapd (2.40+18.04) …
md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: No such file or directory
snapd.failure.service is a disabled or a static unit, not starting it.
snapd.snap-repair.service is a disabled or a static unit, not starting it.
Setting up ibus (1.5.17-3ubuntu5.2) …
Setting up software-properties-gtk (0.96.24.32.11) …
Setting up libpython2.7:amd64 (2.7.15-4ubuntu4~18.04.2) …
Setting up libgs9:amd64 (9.26~dfsg+0-0ubuntu0.18.04.11) …
Setting up cups-client (2.2.7-1ubuntu2.7) …
Setting up libcupscgi1:amd64 (2.2.7-1ubuntu2.7) …
Setting up libglx-mesa0:amd64 (19.0.8-0ubuntu0~18.04.3) …
Setting up libpython3.6:amd64 (3.6.8-1~18.04.3) …
Setting up bind9-host (1:9.11.3+dfsg-1ubuntu1.9) …
Setting up ghostscript (9.26~dfsg+0-0ubuntu0.18.04.11) …
Setting up dnsutils (1:9.11.3+dfsg-1ubuntu1.9) …
Setting up cups-bsd (2.2.7-1ubuntu2.7) …
Setting up libgl1-mesa-glx:amd64 (19.0.8-0ubuntu0~18.04.3) …
Setting up ghostscript-x (9.26~dfsg+0-0ubuntu0.18.04.11) …
Setting up gdb (8.1-0ubuntu3.1) …
Setting up cups (2.2.7-1ubuntu2.7) …
Updating PPD files for cups …
Updating PPD files for cups-filters …
Updating PPD files for foomatic-db-compressed-ppds …
Updating PPD files for openprinting-ppds …
Updating PPD files for brlaser …
Updating PPD files for c2esp …
Updating PPD files for foo2zjs-common …
Updating PPD files for gutenprint …
Updating PPD files for hpcups …
Updating PPD files for m2300w …
Updating PPD files for postscript-hp …
Updating PPD files for ptouch …
Updating PPD files for pxljr …
Updating PPD files for sag-gdi …
Updating PPD files for splix …
Setting up bluez-cups (5.48-0ubuntu3.2) …
Setting up libreoffice-style-galaxy (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-style-tango (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-common (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-core (1:6.0.7-0ubuntu0.18.04.10) …
Setting up python3-uno (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-gtk3 (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-style-breeze (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-gnome (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-pdfimport (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-draw (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-avmedia-backend-gstreamer (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-impress (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-math (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-base-core (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-calc (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-ogltrans (1:6.0.7-0ubuntu0.18.04.10) …
Setting up libreoffice-writer (1:6.0.7-0ubuntu0.18.04.10) …
Processing triggers for mime-support (3.60ubuntu1) …
Processing triggers for ureadahead (0.100.0-21) …
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) …
Processing triggers for dictionaries-common (1.27.2) …
Processing triggers for install-info (6.5.0.dfsg.1-2) …
Processing triggers for plymouth-theme-ubuntu-text (0.9.3-1ubuntu7.18.04.2) …
update-initramfs: deferring update (trigger activated)
Processing triggers for cracklib-runtime (2.9.2-5build1) …
Processing triggers for libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.4) …
Processing triggers for initramfs-tools (0.130ubuntu3.8) …
update-initramfs: Generating /boot/initrd.img-5.0.0-23-generic
Setting up gnome-control-center (1:3.28.2-0ubuntu0.18.04.5) …
Processing triggers for libgtk-3-0:amd64 (3.22.30-1ubuntu4) …
Processing triggers for libc-bin (2.27-3ubuntu1) …
Setting up gnome-software (3.28.1-0ubuntu4.18.04.12) …
Processing triggers for systemd (237-3ubuntu10.31) …
Setting up gnome-initial-setup (3.28.0-2ubuntu6.16.04.6) …
Processing triggers for man-db (2.8.3-2ubuntu0.1) …
Processing triggers for shared-mime-info (1.9-2) …
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) …
Processing triggers for dbus (1.12.2-1ubuntu1.1) …
Processing triggers for hicolor-icon-theme (0.17-2) …
Processing triggers for fontconfig (2.12.6-0ubuntu2) …
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) …
Processing triggers for libgtk2.0-0:amd64 (2.24.32-1ubuntu1) …
Setting up ubuntu-software (3.28.1-0ubuntu4.18.04.12) …
Setting up libmutter-2-0:amd64 (3.28.4-0ubuntu18.04.2) …
Setting up gnome-software-plugin-snap (3.28.1-0ubuntu4.18.04.12) …
Setting up gir1.2-mutter-2:amd64 (3.28.4-0ubuntu18.04.2) …
Setting up mutter (3.28.4-0ubuntu18.04.2) …
Setting up gnome-shell (3.28.4-0ubuntu18.04.2) …
Processing triggers for libc-bin (2.27-3ubuntu1) …
jerry@jerry:~$
jerry@jerry:~$
jerry@jerry:~$
jerry@jerry:~$ sudo apt install openssh-server
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
ncurses-term openssh-sftp-server ssh-import-id
Suggested packages:
molly-guard monkeysphere rssh ssh-askpass
The following NEW packages will be installed:
ncurses-term openssh-server openssh-sftp-server ssh-import-id
0 upgraded, 4 newly installed, 0 to remove and 3 not upgraded.
Need to get 637 kB of archives.
After this operation, 5,316 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ncurses-term all 6.1-1ubuntu1.18.04 [248 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssh-sftp-server amd64 1:7.6p1-4ubuntu0.3 [45.6 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssh-server amd64 1:7.6p1-4ubuntu0.3 [333 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ssh-import-id all 5.7-0ubuntu1.1 [10.9 kB]
Fetched 637 kB in 14s (46.0 kB/s)
Preconfiguring packages …
Selecting previously unselected package ncurses-term.
(Reading database … 126287 files and directories currently installed.)
Preparing to unpack …/ncurses-term_6.1-1ubuntu1.18.04_all.deb …
Unpacking ncurses-term (6.1-1ubuntu1.18.04) …
Selecting previously unselected package openssh-sftp-server.
Preparing to unpack …/openssh-sftp-server_1%3a7.6p1-4ubuntu0.3_amd64.deb …
Unpacking openssh-sftp-server (1:7.6p1-4ubuntu0.3) …
Selecting previously unselected package openssh-server.
Preparing to unpack …/openssh-server_1%3a7.6p1-4ubuntu0.3_amd64.deb …
Unpacking openssh-server (1:7.6p1-4ubuntu0.3) …
Selecting previously unselected package ssh-import-id.
Preparing to unpack …/ssh-import-id_5.7-0ubuntu1.1_all.deb …
Unpacking ssh-import-id (5.7-0ubuntu1.1) …
Setting up ncurses-term (6.1-1ubuntu1.18.04) …
Setting up openssh-sftp-server (1:7.6p1-4ubuntu0.3) …
Setting up ssh-import-id (5.7-0ubuntu1.1) …
Setting up openssh-server (1:7.6p1-4ubuntu0.3) …
Creating config file /etc/ssh/sshd_config with new version
Creating SSH2 RSA key; this may take some time …
2048 SHA256:IeZa2Rlvo2cbyj9F81snVj6a7IYgvM4twmvBQ9lbkqA root@jerry (RSA)
Creating SSH2 ECDSA key; this may take some time …
256 SHA256:wE2C8Ur6RzgDoDMvGBw1E2y6fHCHhHXQMsQKhpWEMns root@jerry (ECDSA)
Creating SSH2 ED25519 key; this may take some time …
256 SHA256:RoA1zrU7zZFuaqPG9wXESIKGQSJSRg65iOEweR2QoDc root@jerry (ED25519)
Created symlink /etc/systemd/system/sshd.service ? /lib/systemd/system/ssh.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service ? /lib/systemd/system/ssh.service.
Processing triggers for man-db (2.8.3-2ubuntu0.1) …
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) …
Processing triggers for ureadahead (0.100.0-21) …
Processing triggers for systemd (237-3ubuntu10.31) …
jerry@jerry:~$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 356/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 12636/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 490/cupsd
tcp6 0 0 :::22 ::😗 LISTEN 12636/sshd
tcp6 0 0 ::1:631 ::😗 LISTEN 490/cupsd
udp 0 0 0.0.0.0:631 0.0.0.0:* 592/cups-browsed
udp 0 0 127.0.0.53:53 0.0.0.0:* 356/systemd-resolve
udp 0 0 0.0.0.0:68 0.0.0.0:* 626/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 630/dhclient
udp 0 0 0.0.0.0:5353 0.0.0.0:* 514/avahi-daemon: r
udp 0 0 0.0.0.0:36106 0.0.0.0:* 514/avahi-daemon: r
udp6 0 0 :::5353 ::😗 514/avahi-daemon: r
udp6 0 0 :::43324 ::😗 514/avahi-daemon: r
jerry@jerry:~$ ^C
jerry@jerry:~$ ^C
jerry@jerry:~$