摘要:如何识别服务器是物理机还是虚拟机及其平台 以下是在 Ubuntu/Linux 系统中判断服务器是否为虚拟机,以及识别其平台(如 VMware、Hyper-V、阿里云、华为云等)的方法: 方法一:使用 systemd-detect-virt(推荐) 命令: systemd-detect-virt 返回
阅读全文
摘要:OpenSSH权限提升漏洞(CVE-2021-41617)
Alibaba Cloud Linux release 3 升级OpenSSH至最新8.8p1
阅读全文
摘要:[root@rusking ~]# hostnamectl Static hostname: rusking.ultrapower.com Icon name: computer-laptop Chassis: laptop Machine ID: 151d09f2391f46a2ac6eb1962
阅读全文
摘要:一、配置RHEL8 使用 EPEL Repository1. Installing the configuration package$ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noar
阅读全文
摘要:Yum Package Manager has been replaced by DNF Package Manager since many long-standing issues in Yum remain unresolved. These problems include poor per
阅读全文
摘要:1. 使用last命令查看登录服务器的用户记录。 [root@centos8 ~]# last rusking pts/2 192.168.1.102 Sun Aug 23 18:38 still logged in rusking pts/2 192.168.1.102 Sun Aug 23 18
阅读全文
摘要:1. The syntax of the DNF command 语法dnf [Option] [Command] [Package_Name] 2. Location of the DNF Configuration Files 相关配置文件 Main Configuration: /etc/dn
阅读全文
摘要:There are three classes of hostname: static, pretty, and transient.static - The traditional hostname. It is stored in the /etc/hostname file and can b
阅读全文
摘要:[root@centos8 ~]# cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core) 1. Create Test SUDO user and add to wheel group.[root@centos8 ~]# usera
阅读全文
摘要:#ifconfig -a | grep inet6#ip addr show | grep net6 #vi /etc/default/grubGRUB_CMDLINE_LINUX 该行增加ipv6.disable=1 [root@centos8 ~]# grep CMDLINE /etc/defa
阅读全文
摘要:1. Install SSH service $ sudo apt install openssh-server$ systemctl status sshd$ sudo systemctl restart ssh$ sudo ufw allow ssh$ sudo systemctl enable
阅读全文
摘要:1. 图形界面 Turn Off,之后重新Connect 2. The first and recommended command to restart your network is: $ sudo netplan apply 3. Network restart for networkd man
阅读全文
摘要:Ubuntu 20.04 Install Guest Additions for VirtualBox时有报错: This system is currently not set up to build kernel modules.Please install the gcc make perl
阅读全文
摘要:1. 查看/var/logdu -hm --max-depth=1 /var/log | sort -n # du -hm --max-depth=1 /var/log | sort -n 1 /var/log/anaconda 1 /var/log/chrony 1 /var/log/multi-
阅读全文
摘要:1. 配置Yum源 RHEL系统安装完成之后,如果没有注册并购买红帽服务是无法连接到官方的Yum源的,也就无法直接使用Yum命令来安装软件包及更新系统。 [root@wuhan2020 /]# hostnamectl Static hostname: wuhan2020 Icon name: com
阅读全文
摘要:CentOS 7修改方式如下: # lsb_release -a --查看系统版本-CentOS Linux release 7.6 # timedatectl --查看当前系统时区# ls -l /etc/localtime# timedatectl list-timezones | grep '
阅读全文
摘要:When I open the file in vim, I am seeing strange ^M characters. Unfortunately, the world's favorite search engine does not do well with special charac
阅读全文
摘要:不让用户修改、删除文件等,使用 chattr保护 chattr命令的用法:chattr [ -RV ] [ -v version ] [ mode ] files… 最关键的是在[mode]部分,[mode]部分是由+-=和[ASacDdIijsTtu]这些字符组合的,这部分是用来控制文件的 属性。
阅读全文
摘要:1. 账号和口令 1.1 禁用或删除无用账号 减少系统无用账号,降低安全风险。 操作步骤 使用命令 userdel <用户名> 删除不必要的账号。 使用命令 passwd -l <用户名> 锁定不必要的账号。 使用命令 passwd -u <用户名> 解锁必要的账号。 1.2 检查特殊账号 检查是否
阅读全文