kylin用户就是默认的,所以我后面就要修改kylin密码【旁边xz_tyng】是我后面建的。
einspurlog后立刻按F10,到达GRUB界面
curity=在后面输入rw init=/bin/bash 按 ctrl+x到下一个界面
按 ctrl+x到这个界面
kylin,那么我就修改kylin的密码即可
这界面是不支持reboot的,所以我直接exit重启的

同时又有一个问题,我输入exit就卡死了
重启按钮都不生效了。

解决方法是,到底层关闭再启动。
这么操作不影响刚才的密码修改操作,也就是说修改的密码依然是生效的。

底层断电开机后需要重新进入控制台-等待开机中【这次时间可能会比较长,耐心等待】

输入刚才修改的密码

能进系统,成功

右键我的电脑属性

版本查看的几个命令




加上 sudo -i

sudo dpkg -I iptux.deb#查看iptux.deb软件包的详细信息,包括软件名称、版本以及大小等(其中-I等价于–info)sudo dpkg -c iptux.deb#查看iptux.deb软件包中包含的文件结构(其中-c等价于–contents)sudo dpkg -i iptux.deb#安装iptux.deb软件包(其中-i等价于–install)sudo dpkg -l iptux#查看iptux软件包的信息(软件名称可通过dpkg -I命令查看,其中-l等价于–list)sudo dpkg -L iptux#查看iptux软件包安装的所有文件(软件名称可通过dpkg -I命令查看,其中-L等价于–listfiles)sudo dpkg -s iptux#查看iptux软件包的详细信息(软件名称可通过dpkg -I命令查看,其中-s等价于–status)sudo dpkg -r iptux#卸载iptux软件包(软件名称可通过dpkg -I命令查看,其中-r等价于–remove)
下载ubuntu 的deb包可以在以下网址中下载,该网站只能搜到18.04的deb包,没有16.04的包,也可以在ubuntu16.04中使用:
http://ports.ubuntu.com/pool/main/
中科大源中下载deb:
http://mirrors.ustc.edu.cn/ubuntu-ports/pool/main/
清华源中下载deb:
https://mirrors.tuna.tsinghua.edu.cn/
这个好像是官方的,最牛逼,有amd64的deb包:
http://archive.ubuntu.com/ubuntu/pool/main/
前三个只有arm64的

最后一个有amd架构的,很棒。

dpkg -i package_name_xx.deb的方式离线安装对应软件包。kylin@host-10-233-166-43:~/deb$ sudo dpkg -i sysstat_10.2.0-1_amd64.deb
sudo: unable to resolve host host-10-233-166-43: Connection timed out
Selecting previously unselected package sysstat.
(Reading database ... 236434 files and directories currently installed.)
Preparing to unpack sysstat_10.2.0-1_amd64.deb ...
Unpacking sysstat (10.2.0-1) ...
Setting up sysstat (10.2.0-1) ...
Creating config file /etc/default/sysstat with new version
update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto mode
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Processing triggers for systemd (229-4kord21.21k4) ...
Processing triggers for ureadahead (0.100.0-19kord) ...
Processing triggers for man-db (2.7.5-1kord) ...
kylin@host-10-233-166-43:~/deb$
kylin@host-10-233-166-43:~$ cd deb/
kylin@host-10-233-166-43:~/deb$ ls
sysstat_10.2.0-1_amd64.deb sysstat_10.2.0-1_arm64.deb sysstat_10.2.0-1_powerpc.deb sysstat_10.2.0-1_ppc64el.deb
kylin@host-10-233-166-43:~/deb$
kylin@host-10-233-166-43:~/deb$ sudo dpkg -i sysstat_10.2.0-1_powerpc.deb
sudo: unable to resolve host host-10-233-166-43: Connection timed out
dpkg: error processing archive sysstat_10.2.0-1_powerpc.deb (--install):
package architecture (powerpc) does not match system (amd64)
Errors were encountered while processing:
sysstat_10.2.0-1_powerpc.deb
kylin@host-10-233-166-43:~/deb$
# 查看状态
kylin@host-10-233-166-43:~/deb$ systemctl status sysstat
● sysstat.service - LSB: Start/stop sysstat's sadc
Loaded: loaded (/etc/init.d/sysstat; bad; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
# 我没加sudo也成功了,如果你报错了,前面加上sudo啊。
# 这个需要输入密码,密码是当前用户的密码,下面是密码输错的提示内容
kylin@host-10-233-166-43:~/deb$ systemctl restart sysstat
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'sysstat.service'.
Authenticating as: kylin,,, (kylin)
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to restart sysstat.service: Access denied
See system logs and 'systemctl status sysstat.service' for details.
# 密码输入验证成功
kylin@host-10-233-166-43:~/deb$ systemctl restart sysstat
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'sysstat.service'.
Authenticating as: kylin,,, (kylin)
Password:
==== AUTHENTICATION COMPLETE ===
# 状态现在对了
kylin@host-10-233-166-43:~/deb$ systemctl status sysstat
● sysstat.service - LSB: Start/stop sysstat's sadc
Loaded: loaded (/etc/init.d/sysstat; bad; vendor preset: enabled)
Active: active (exited) since Fri 2022-06-24 02:43:58 CST; 3s ago
Docs: man:systemd-sysv-generator(8)
Process: 3371 ExecStart=/etc/init.d/sysstat start (code=exited, status=0/SUCCESS)
Jun 24 02:43:58 host-10-233-166-43 systemd[1]: Starting LSB: Start/stop sysstat's sadc...
Jun 24 02:43:58 host-10-233-166-43 systemd[1]: Started LSB: Start/stop sysstat's sadc.
kylin@host-10-233-166-43:~/deb$
kylin@host-10-233-166-43:~/deb$
# 加入开机自启
kylin@host-10-233-166-43:~/deb$ systemctl status sysstat
● sysstat.service - LSB: Start/stop sysstat's sadc
Loaded: loaded (/etc/init.d/sysstat; bad; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
kylin@host-10-233-166-43:~/deb$ systemctl restart sysstat
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'sysstat.service'.
Authenticating as: kylin,,, (kylin)
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to restart sysstat.service: Access denied
See system logs and 'systemctl status sysstat.service' for details.
kylin@host-10-233-166-43:~/deb$ systemctl restart sysstat
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'sysstat.service'.
Authenticating as: kylin,,, (kylin)
Password:
==== AUTHENTICATION COMPLETE ===
kylin@host-10-233-166-43:~/deb$ systemctl status sysstat
● sysstat.service - LSB: Start/stop sysstat's sadc
Loaded: loaded (/etc/init.d/sysstat; bad; vendor preset: enabled)
Active: active (exited) since Fri 2022-06-24 02:43:58 CST; 3s ago
Docs: man:systemd-sysv-generator(8)
Process: 3371 ExecStart=/etc/init.d/sysstat start (code=exited, status=0/SUCCESS)
Jun 24 02:43:58 host-10-233-166-43 systemd[1]: Starting LSB: Start/stop sysstat's sadc...
Jun 24 02:43:58 host-10-233-166-43 systemd[1]: Started LSB: Start/stop sysstat's sadc.
kylin@host-10-233-166-43:~/deb$
kylin@host-10-233-166-43:~/deb$
kylin@host-10-233-166-43:~/deb$ iostat -dx 2 3
Linux 4.4.131-20200704.kylin.x86-generic (host-10-233-166-43) 06/24/2022 _x86_64_ (8 CPU)
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
vda 0.01 1.89 6.42 0.94 198.22 13.07 57.39 0.08 11.38 10.55 17.08 3.39 2.50
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
vda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
vda 0.00 1.00 0.00 1.00 0.00 8.00 16.00 0.01 10.00 0.00 10.00 10.00 1.00
kylin@host-10-233-166-43:~/deb$