系统之间的区别
系统之间的区别
1.版本区别
Kylin,Centos,ubt
CentOS内核版本:
内核<3>3>.10.0
Kylin v10 sp3
内核<4>4>.19.90
Ubuntu 20.04 lts
内核<5>5>.4.0(20.04) 5.15(22.04)
1)查看内核信息root@oldboy:~# uname -aLinux oldboy 5.15.0-164-generic# Ubuntu[root@test ~]# uname -aLinux test 3.10.0-1160.119.1.el7.x86_64# centos7[root@m01 ~]# uname -r4.19.90-52.22.v2207.ky10.x86_64# kylin v10
2)查看操作系统版本信息cat /etc/os-releaseroot@oldboy:~# cat /etc/os-releasePRETTY_NAME="Ubuntu 22.04.4 LTS"NAME="Ubuntu"VERSION_ID="22.04"VERSION="22.04.4 LTS (Jammy Jellyfish)"VERSION_CODENAME=jammyID=ubuntuID_LIKE=debianHOME_URL="https://www.ubuntu.com/"# Ubuntu[root@test ~]# cat /etc/os-releaseNAME="CentOS Linux"VERSION="7 (Core)"ID="centos"ID_LIKE="rhel fedora"VERSION_ID="7"PRETTY_NAME="CentOS Linux 7 (Core)"# centos72.用户密码的区别
centos和ubt可以设置简单的密码 1
kylin有密码复杂度要求 test123.com
3.登录用户的区别
centos和kylin默认都直接使用root登录
- 我们创建用户的时候,创建了一个oldboy用户

📌 Ubuntu安装时的Profile setup界面: 主机名和用户名都是oldboy, 密码可以直接设为简单的
1
ubt默认使用普通用户来登录(默认root被禁止登录)
-
ubt默认我们自己创建用户系统给做了sudo提权
-
❌️ root登录不上
Ubuntu 22.04.4 LTS oldboy tty1
oldboy login: rootPassword:
Login incorrectoldboy login:# root登录不上,默认被禁止- ✅️ oldboy可以登录上
oldboy login: oldboyPassword:Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-94-generic x86_64)
* Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro
System information as of Mon Dec 29 10:38:46 AM UTC 2025
System load: 0.1513671875 Processes: 228 Usage of /: 21.0% of 23.45GB Users logged in: 0 Memory usage: 16% IPv4 address for ens33: 10.0.0.201 Swap usage: 0%# oldboy可以登录上'oldboy用户'- ✅️ oldboy默认就有sudo提权
oldboy@oldboy:~$ sudo -l[sudo] password for oldboy:Matching Defaults entries for oldboy on oldboy: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, use_pty
User oldboy may run the following commands on oldboy: (ALL : ALL) ALL# 创建用户时系统给做了sudo提权1)使用普通用户oldboy登录系统2)sudo su - 切换到root# ❌ 错误示范: su - root# 我们并没有办法直接切换到root用户,因为并不知道root用户的密码oldboy@oldboy:~$ sudo su -[sudo] password for oldboy:# 前面必须要有sudo# 中间输入oldboy的密码'所以我们Xshell连接设置Ubuntu时,它的初次登录用户是oldboy,直接登root是登录不上的'3)再切换为root用户Xshell登录脚本
-
但是每次都切换登录会不会太麻烦了点
- Xshell有登陆的脚本的


📌 登录脚本的本质: 勾选
执行以下等待并发送规则, 添加规则, 遇到~$提示符就自动帮我们敲sudo su -
Last login: Mon Dec 29 16:10:53 2025 from 10.0.0.1oldboy@oldboy:~$ sudo su -[sudo] password for oldboy:# 脚本帮我们敲了sudo su -, 但现在还需要我们输入oldboy的密码两种解决办法
- 继续添加脚本: 遇到
oldboy:输入1(oldboy的密码) - 在visudo添加
NOPASSWD:ALL- 这样的话,就不需要输入oldboy的密码了.
- 个人感觉第二种更加方便一点.
visudo
# visudo默认打开的是nano编辑器# 找到下面这一行, 在ALL后面追加NOPASSWD:ALL# Allow members of group sudo to execute any command%sudo ALL=(ALL:ALL) ALL,NOPASSWD:ALL# nano编辑器: Ctrl+S保存, Ctrl+X退出-
这里用的是nano编辑器.
- 后面在sudo提权中我们把visudo的默认编辑器修改为vim
oldboy@oldboy:~$ sudo -lMatching Defaults entries for oldboy on oldboy: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, use_pty
User oldboy may run the following commands on oldboy: (ALL : ALL) ALL, NOPASSWD:ALL# ✅ 再次测试,不需要密码直接进来4.⭐有区别的命令
ll 查看
默认显示隐藏文件
root@oldboy:~# lltotal 24drwx------ 4 root root 4096 Dec 1 13:51 ./drwxr-xr-x 20 root root 4096 Dec 1 13:43 ../-rw-r--r-- 1 root root 3106 Oct 15 2021 .bashrc......# .bashrc这种隐藏文件也直接显示出来了root@oldboy:~# alias......alias ll='ls -alF'# 因为别名有-aalias ls='ls --color=auto'5.rc.local
#开机自启动文件
centos和kylin系统默认是存在
ubt默认是不存在需要我们手动创建(注意给x权限)
①创建并x赋权
root@oldboy:~# touch /etc/rc.localroot@oldboy:~# chmod +x /etc/rc.local# 别忘了给x权限root@oldboy:~# ll /etc/rc.local-rwxr-xr-x 1 root root 0 Nov 17 02:00 /etc/rc.local*# 可执行文件后面带*②编辑rc.local文件
#!/bin/bash# 你的启动命令写在这里exit 0开头结尾得按照这个写
编辑之前先看一下,里面的环境变量
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
✅️ 完整实验走一遍:
1)编辑文件root@oldboy:~# vi /etc/rc.local# 先编辑, 别忘了赋x权限root@oldboy:~# cat /etc/rc.local#!/bin/bashecho ${PATH} >> /home/1.txtexit 0# 开头结尾, 具体的命令写在中间
2)重启rc-local服务'不一定非得重启呀, 重启服务也是一样的呀!'root@oldboy:~# systemctl restart rc-local.serviceroot@oldboy:~# systemctl status rc-local.service● rc-local.service - /etc/rc.local Compatibility Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled) Drop-In: /usr/lib/systemd/system/rc-local.service.d └─debian.conf Active: active (exited) since Mon 2025-12-29 17:43:29 UTC; 6s ago Docs: man:systemd-rc-local-generator(8) Process: 1545 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS) CPU: 2ms# 日志Dec 29 17:43:29 oldboy systemd[1]: Starting /etc/rc.local Compatibility...Dec 29 17:43:29 oldboy systemd[1]: Started /etc/rc.local Compatibility.
3)验证里面的环境变量root@oldboy:~# cat /home/1.txt/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin# 能成功起来, 并且日志不报错, 那就是正确的- ubuntu: 使用systemctl管理服务器自动运行
systemctl enable rc-local.service ???
rc-local.service 是一个静态(static) 服务单元,只要 /etc/rc.local 文件存在、可执行,并且格式正确,系统就会在启动时自动运行它
⚠️ 你不需要、也不能用 systemctl enable rc-local.service 来启用它.
6.系统日志
登录日志:
- centos和kylin:
/var/log/secure
- ubuntu:
/var/log/auth.log
系统日志:
- centos和kylin:
/var/log/messages
- ubt:
/var/log/syslog
-
在 Ubuntu 中,/var/log/syslog 默认会记录系统日志,也包括 cron(定时任务)的日志,
- 但前提是 cron 日志功能已启用.
7.创建用户
useradd oldboy # 默认创建的普通用户 -u -g -s # /bin/bash /sbin/nologin -M # 不创建家目录Ubuntu/Debian 默认不创建家目录,-m 选项的效果:强制创建家目录(因为默认不建)Shell 留空或为 /bin/sh
root@Docker ~# id wwwid: ‘www’: no such userroot@Docker ~# useradd wwwroot@Docker ~# id wwwuid=1001(www) gid=1001(www) groups=1001(www)root@Docker ~# tail -1 /etc/passwdwww:x:1001:1001::/home/www:/bin/sh'/home/www:家目录字段(只是配置,不保证存在)'root@Docker ~# ls /home/ubuntu`这个用户创建时没有加 -m,所以 useradd 只是把 /home/www 写进了配置文件,但没有实际去 mkdir /home/www`ubt创建普通用户:
root@oldboy:~# useradd -s /bin/bash -m test02-m # 创建家目录-s # 指定解释器8.用户密码
交互式:
centos和kylin和ubt的交互式都相同
passwd # 直接回车修改当前用户密码passwd oldboy # 修改指定用户密码只有root才能指定修改用户密码
非交互:
# 在 RHEL / CentOS 系列中,passwd 命令支持 --stdin 选项,允许从标准输入读取密码echo 密码 | passwd --stdin 用户
# 在 Ubuntu 及大多数基于 Debian 或国产的麒麟系统上,标准做法是使用 chpasswd:echo '用户名:密码' | chpasswd中间用 : 冒号隔开
9.sudo提权
centos和kylin
visudo
这里面默认也是vim编辑器
vim /etc/sudoers
ubuntu:
修改默认编辑器为vim
vim /etc/sudoers
root@oldboy:~# vim /etc/sudoers# 添加默认的选项, 在第13行加入以下配置、保存退出Defaults env_resetDefaults mail_badpassDefaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"Defaults use_ptyDefaults editor=/usr/bin/vim, env_editor# ⬆️ 添加这一行- 操作完成后visudo就修改为vim编辑器了
10.tmp目录
centos和ubt的tmp目录都属于磁盘空间
# Ubunturoot@oldboy:~# df -hFilesystem Size Used Avail Use% Mounted ontmpfs 193M 1.3M 192M 1% /run/dev/mapper/ubuntu--vg-ubuntu--lv 24G 5.0G 18G 23% /tmpfs 965M 0 965M 0% /dev/shmtmpfs 965M 0 965M 0% /run/lock/dev/sda2 2.0G 129M 1.7G 8% /boottmpfs 193M 4.0K 193M 1% /run/user/1000# ⬆️ 属于根分区# /tmp没有成为专门的挂载点银河麒麟 V10 默认将 /tmp 挂载为 tmpfs,也就是用内存来存临时文件(企业需要卸载优化)
后期会专门做CDN缓存,放热点数据.
# Kylin V10[root@oldboy ~]# df -hFilesystem Size Used Avail Use% Mounted ondevtmpfs 963M 0 963M 0% /devtmpfs 979M 8.9M 970M 1% /runtmpfs 979M 0 979M 0% /sys/fs/cgroup/dev/mapper/klas-root 47G 3.8G 44G 9% /tmpfs 979M 0 979M 0% /tmp# ⬆️ tmpfs, 被挂载在使用/dev/sda1 1014M 169M 846M 17% /boottmpfs 196M 0 196M 0% /run/user/0[root@oldboy ~]# umount /tmp# 取消当前的 tmpfs 挂载[root@oldboy ~]# systemctl mask tmp.mount# 永久禁用 tmp.mount 服务11.selinux
centos需要关闭
修改/etc/selinux/config文件
开机禁止自启 第七行修改为disabled
[root@localhost ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.SELINUX=enforcing# ⬆️ 第七行, 修改为disabled# SELINUXTYPE= can take one of three two values:# targeted - Targeted processes are protected,# minimum - Modification of targeted policy. Only selected processes are protected.# mls - Multi Level Security protection.SELINUXTYPE=targeted虚拟机重启生效!
kylin和ubt都是关闭的.
getenforce# 查看状态# 只要不是Enforcing就是关闭状态
setenforce 0# 将 SELinux 模式从 enforcing 切换为 permissive# ✅ 立即生效, 无须重启# ⚠️ 重启后失效, 重新变回Enforcing12.防火墙
centos和kylin称为firewalld
ubt: ufw
就是Ubuntu的firewalld
- 简称ufw
root@oldboy:~# systemctl stop ufwroot@oldboy:~# systemctl disable ufw# 开机禁止启动root@oldboy:~# systemctl status ufw○ ufw.service - Uncomplicated firewall Loaded: loaded (/lib/systemd/system/ufw.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:ufw(8)
Dec 30 02:19:42 oldboy systemd[1]: Starting Uncomplicated firewall...Dec 30 02:19:42 oldboy systemd[1]: Finished Uncomplicated firewall.Dec 30 02:33:11 oldboy systemd[1]: Stopping Uncomplicated firewall...Dec 30 02:33:11 oldboy ufw-init[1279]: Skip stopping firewall: ufw (not enabled)Dec 30 02:33:12 oldboy systemd[1]: ufw.service: Deactivated successfully.Dec 30 02:33:12 oldboy systemd[1]: Stopped Uncomplicated firewall.# ✅ 看到 disabled + inactive (dead) 才是彻底关掉了13.时间
timedatectl status
查看时区 time zone部分
[root@oldboy network-scripts]# timedatectl status Local time: Sun 2025-12-07 21:39:29 CST Universal time: Sun 2025-12-07 13:39:29 UTC RTC time: Sun 2025-12-07 13:39:28 Time zone: Asia/Shanghai (CST, +0800)# 主要是这里查看时区System clock synchronized: yes NTP service: active RTC in local TZ: no# 如果不正确, 修改时区为亚洲/上海[root@oldboy network-scripts]# timedatectl set-timezone Asia/Shanghai- 它们查看时区和修改时区的方法都是一样的
Centos和Kylin后面时间同步的话,用ntpdate命令来实现.
-
因为它俩不会进行自动的时间同步
-
所以后面我们需要,ntpdate放在定时任务里面,进行实时同步
- 不然有些服务跑着跑着,时间出现误差
-
# Ubuntu会自己进行时间同步# 验证: 当你修改为一个错误的时间, 它会自己进行时间同步# 它有一个时间同步的配置文件/etc/systemd/timesyncd.confUbuntu修改为24小时
# 默认显示的是12小时的root@oldboy:~# dateTue Dec 30 11:13:59 AM CST 2025# AM上午, PM下午root@oldboy:~# dateTue Dec 30 12:01:44 PM CST 2025
root@oldboy:~# echo "LC_TIME=en_DK.UTF-8" >>/etc/default/locale# 它是一个变量, 重新连接后生效, 不必重启root@oldboy:~# dateTue Dec 30 11:59:02 CST 2025# ✅ 这样后面就没有AM或者PM了14.软件安装
yum VS apt
#Kylinyum -y install xxxyum -y remove xxx
#Ubuntuapt -y install xxapt -y remove xxrpm VS dpkg
①安装软件内容:
# kylinrpm -ivh xxx.rpm# ubtdpkg -i xxx.deb # -i- 一个是rpm的包,一个是deb的包,不要搞混
我这里把光驱挂载到 /mnt目录下了.
root@oldboy:/mnt/pool/main# ll /mnt/pool/main/o/openssh/total 468dr-xr-xr-x 1 root root 2048 Feb 17 2024 ./dr-xr-xr-x 1 root root 2048 Feb 17 2024 ../-r--r--r-- 1 root root 435336 Jan 4 2024 openssh-server_1%3a8.9p1-3ubuntu0.6_amd64.deb-r--r--r-- 1 root root 38716 Jan 4 2024 openssh-sftp-server_1%3a8.9p1-3ubuntu0.6_amd64.deb# 光驱里全是.deb的包root@oldboy:/mnt/pool/main# dpkg -i /mnt/pool/main/o/openssh/openssh-server_1%3a8.9p1-3ubuntu0.6_amd64.deb(Reading database ... 74503 files and directories currently installed.)Preparing to unpack .../openssh-server_1%3a8.9p1-3ubuntu0.6_amd64.deb ...Unpacking openssh-server (1:8.9p1-3ubuntu0.6) over (1:8.9p1-3ubuntu0.6) ...Setting up openssh-server (1:8.9p1-3ubuntu0.6) ...rescue-ssh.target is a disabled or a static unit not running, not starting it.ssh.socket is a disabled or a static unit not running, not starting it.Processing triggers for ufw (0.36.1-4ubuntu0.1) ...Processing triggers for man-db (2.10.2-1) ...②检查软件是否安装:
# kylinrpm -qa wget# ubtdpkg -l wget # -l(小写)root@oldboy:/mnt/pool/main# dpkg -l openssh-serverDesired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)||/ Name Version Architecture Description+++-==============-===================-============-=================================ii openssh-server 1:8.9p1-3ubuntu0.6 amd64 secure shell (SSH) server, for secure access from remote machines# 小写l, 查看是否安装# ii 开头, 说明软件正常安装- 也可以查看通过apt命令安装的软件.
③查看软件包目录列表:
# kylinrpm -ql wget# ubtdpkg -L wget # -L(大写)root@oldboy:/mnt/pool/main# dpkg -L openssh-server/./etc/etc/default/etc/default/ssh/etc/init.d/etc/init.d/ssh/etc/pam.d/etc/pam.d/sshd/etc/ssh/etc/ssh/moduli/etc/ssh/sshd_config.d...# 大写L, 软件包目录列表④软件卸载内容:
# kylinrpm -e wget# ubtdpkg -r wget # -rroot@oldboy:/mnt/pool/main# dpkg -r openssh-server(Reading database ... 74503 files and directories currently installed.)Removing openssh-server (1:8.9p1-3ubuntu0.6) ...Processing triggers for man-db (2.10.2-1) ...# -r 卸载擦除修改仓库地址:
默认仓库地址:
- centos需要修改为国内的
- kylin默认的仓库不需要修改、只添加epel仓库.
- 添加扩展仓库
- ubt默认国外的仓库,需要修改为国内仓库
- 国内的仓库软件就很多,不需要再添加epel仓库了
(1)查看版本号
root@oldboy:~# cat /etc/os-releasePRETTY_NAME="Ubuntu 22.04.4 LTS"NAME="Ubuntu"# 版本号是22.04 LTS, 代号jammy, 去阿里镜像站复制对应版本的配置(2)修改默认仓库、将原来的内容删除、写入以下内容
root@oldboy:~# vim /etc/apt/sources.list在这个目录下
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiversedeb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiversedeb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiversedeb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiversedeb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse(3)执行命令生效
root@oldboy:~# apt update相当于生成缓存,进而生效
- 必须要有
查看当前ubt默认使用的仓库地址
root@oldboy:~# apt-cache policyPackage files: 100 /var/lib/dpkg/status release a=now 100 https://mirrors.aliyun.com/ubuntu jammy-backports/universe amd64 Packages release v=22.04,o=Ubuntu,a=jammy-backports,n=jammy,l=Ubuntu,c=universe,b=amd64 origin mirrors.aliyun.com# origin mirrors.aliyun.com, 说明换源成功15.定时任务
①配置方式
centos和kylin:
crontab -e 直接编辑即可
ubt:
crontab -e 编辑后选择编辑器为vim
root@oldboy:~# crontab -eno crontab for root - using an empty one
Select an editor. To change later, run 'select-editor'. 1. /bin/nano <---- easiest 2. /usr/bin/vim.basic 3. /usr/bin/vim.tiny 4. /bin/ed
Choose 1-4 [1]: 2# 进来先选择编辑器# 选择2这个就行, vim# 这些注释都删除掉就行-
它们系统定时任务是一样的.
- /etc/crontab
root@oldboy:~# cat /etc/crontab# /etc/crontab: system-wide crontab# Unlike any other crontab you don't have to run the `crontab'# command to install the new version when you edit this file# and files in /etc/cron.d. These files also have username fields,# that none of the other crontabs do.
SHELL=/bin/sh# You can also override PATH, but by default, newer versions inherit it from the environment#PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Example of job definition:# .---------------- minute (0 - 59)# | .------------- hour (0 - 23)# | | .---------- day of month (1 - 31)# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat# | | | | |# * * * * * user-name command to be executed# ⬇️ 这些是系统用来切割日志的 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )②日志文件位置
centos和kylin:
/var/log/cron
ubt:
/var/log/syslog
root@oldboy:~# tail -5 /var/log/syslogDec 30 08:09:41 oldboy systemd[1]: Finished Update the local ESM caches.Dec 30 08:17:01 oldboy CRON[6001]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)Dec 30 08:18:45 oldboy crontab[6004]: (root) BEGIN EDIT (root)Dec 30 08:24:36 oldboy crontab[6004]: (root) REPLACE (root)Dec 30 08:24:36 oldboy crontab[6004]: (root) END EDIT (root)# ⬆️ 定时任务的日志也在syslog里-
在 Ubuntu 中,/var/log/syslog 默认会记录系统日志,也包括 cron(定时任务)的日志,
- 但前提是 cron 日志功能已启用.
③定向到空语法
kylin和centos
echo xxx &>/dev/nullubt不支持使用 &>/dev/null
定时任务不支持,但是命令行是支持的
- 不能直接使用&符.
# 错误的2也输入到正确的1里面echo xxx >/dev/null 2>&1# ✅ 这种最简便, 推荐!
# 正确的1写入到null, 错误的2也写入到nullecho xxx >/dev/null 2>/dev/null# ✅ 两种方式都能定向到空16.网卡配置
centos和kylin:
/etc/sysconfig/network-scripts/ifcfg-ens33
ubt: 可用vim直接修改
①编辑
root@oldboy:~# cat /etc/netplan/00-installer-config.yamlnetwork: ethernets: ens33: addresses: - 10.0.0.201/24 nameservers: addresses: - 223.5.5.5 search: [] routes: - to: default via: 10.0.0.2 version: 2# 这个配置文件是yaml, 空格用于对齐, 不能删除- 它们也都可以用图形化工具nmtui进行编辑
root@oldboy:~# nmtuiCommand 'nmtui' not found, but can be installed with:apt install network-manager# ⚠️ 还得安装这个工具才能用图形化工具# 来自Ubuntu②重启网卡
- 最简便的,不需要额外安装工具
root@oldboy:~# netplan applyWARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running.# 这个报错不用管它- 需要额外安装工具进行管理
root@oldboy:~# apt -y install network-managerroot@oldboy:~# systemctl status NetworkManager● NetworkManager.service - Network Manager Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2025-12-30 16:52:46 CST; 21s ago总结
需要记忆的重点:
1.密码复杂度2.创建用户的区别3.免交互设置密码4.登录用户(ubt需要开启root用户)5.系统日志6.sudo ubt需要修改默认的编辑器7.tmp kylin内存空间 centos和ubt磁盘空间8.centos默认开启的, kylin和ubt关闭的 做好笔记9.防火墙名字 firewalld ubt:ufw10.时间 ubt时区11.软件安装yum -y install xx #kylinapt -y install xx #ubt
dpkg -i xx.deb # ubtrpm -ivh xx.rpm # kylin
12.定时任务crontab -e #ubt 需要选择vim编辑器文章分享
如果这篇文章对你有帮助,欢迎分享给更多人!















