在ubuntu18.04中如何使用lastb命令列出登入系统失败的用户相关信息呢?本文给出详细说明。
lastb

说明:单独执行lastb指令,它会读取位于/var/log目录下,名称为btmp的文件,并把该文件内容记录的登入失败的用户名单,全部显示出来。
dpkg 即 package manager for Debian ,是 Debian 和基于 Debian 的系统中一个主要的包管理工具,可以用来管理 deb 格式的软件包。在ubuntu18.04中如何使用dpkg命令管理软件包呢?本文给出详细说明。
1.查看某个软件的安装内容
例如:dpkg -L python

2.查看已经安装了哪些包
dpkg -l

3.安装软件
dpkg -i 软件包名

4.卸载软件
dpkg -r 软件名

apt-cache是linux下的一个apt软件包管理工具。在ubuntu18.04中如何使用apt-cache管理软件呢?本文给出详细说明。
1.显示指定软件包的信息,包括版本号,安装状态和包依赖关系等。
apt-cache show 软件名

2.按关键字查找软件包
apt-cache search 软件名

3.显示软件包依赖关系
apt-cache showpkg 软件名

4.显示软件包的安装状态和版本信息
apt-cache policy 软件名

5.显示指定软件包所依赖的软件包
apt-cache rdepends 软件名

在ubuntu18.04中如何配置单网卡多ip呢?本文给出详细说明。
1.在网卡eth0上增加一个192.169.100.2的ip
sudo ifconfig eth0:0 192.168.100.2 netmask 255.255.255.0
![]()
2.查看增加ip后本机的ip信息
ifconfig

3.删除新增加的ip
sudo ifconfig eth0:0 down
![]()
4.查看删除后本机的IP信息

在ubuntu18.04中如何临时修改MAC地址呢?本文给出详细说明。
1.首先查看网卡信息

2.关闭网卡
sudo ifconfig eth0 down
![]()
3.修改mac地址
sudo ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE
![]()
4.开启网卡
sudo ifconfig eth0 up
![]()
5.查看修改后的网卡信息

1.打开sshd_config文件
vi /etc/ssh/sshd_config

2.将#AllowTcpForwarding yes改为 AllowTcpForwarding no后保存退出

1.打开sshd_config文件
vi /etc/ssh/sshd_config

2.将#PasswordAuthentication yes改为PasswordAuthentication no后保存退出

1.打开sshd_config文件
vi /etc/ssh/sshd_config

2.将#PubkeyAuthentication yes改为PubkeyAuthentication no后保存退出

在Ubuntu18.04系统中,如何进行网络测速?本文将针对此问题进行详细说明。1.首先更新软件列表
sudo apt-get update
2.下载测试脚本
wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

3.修改脚本权限
chmod 755 speedtest.py
将脚本放到系统命令文件中
mv speedtest.py /usr/bin/
4.运行命令
speedtest.py
可以看到测试结果
