新版的centos修改了网卡配置的方法,下面是新的配置方法:

方法1
1.查看当前连接名称:

nmcli connection show

输出示例:

NAME                UUID                                  TYPE      DEVICE
Wired connection 1  12345678-1234-1234-1234-123456789abc  ethernet  eth0

2.修改 IP 地址(假设连接名为 Wired connection 1,网卡为 eth0):

sudo nmcli connection modify "Wired connection 1" ipv4.addresses 192.168.1.100/24
sudo nmcli connection modify "Wired connection 1" ipv4.gateway 192.168.1.1
sudo nmcli connection modify "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4"
sudo nmcli connection modify "Wired connection 1" ipv4.method manual

3.重启连接:

sudo nmcli connection down "Wired connection 1"
sudo nmcli connection up "Wired connection 1"

方法2
1.编辑网卡配置文件(假设网卡名为 eth0):

sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0

2.修改或添加以下内容:

BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4

3.重启网络服务:

sudo systemctl restart network

windows在修改密码后,使用远程桌面连接提示密码错误。

你修改了 Windows 密码后,远程桌面登录提示“密码不正确”,并不一定是你输错了密码,而是 Windows 本身存在密码同步延迟或账户锁定机制触发的问题。

在远程主机上强制同步微软账户密码,操作如下:

1.使用旧密码或其他管理员账户本地登录远程电脑一次。
2.打开 命令提示符(CMD),输入以下命令:

runas /u:MicrosoftAccount\你的邮箱@outlook.com cmd.exe

3.系统会提示输入新密码,输入后回车即可。
4.完成后,远程桌面即可使用新密码登录

windows10系统启用ping功能,允许其他电脑ping请求

以管理员身份允许powershell

netsh advfirewall firewall add rule name="Allow ICMPv4 Echo Request" protocol=icmpv4:8,any dir=in action=allow

ubuntu使用timedatectl管理时间和时区

设置时区

timedatectl list-timezones
timedatectl set-timezone "Asia/Shanghai"

设置时间同步服务器
启用NTP同步

timedatectl set-ntp true

设置同步服务器

vi /etc/systemd/timesyncd.conf
[Time]
NTP=0.cn.pool.ntp.org 1.cn.pool.ntp.org 2.cn.pool.ntp.org 3.cn.pool.ntp.org

查看是否生效

timedatectl timesync-status
timedatectl

1. 安装Xfce4和LightDM
确保所有必要的包都已正确安装:

sudo apt update
sudo apt install xfce4 xfce4-goodies lightdm lightdm-gtk-greeter

2. 配置LightDM为默认显示管理器
确保LightDM被设置为默认的显示管理器:

sudo dpkg-reconfigure lightdm

在弹出的对话框中,选择lightdm
3. 设置Xfce4为默认桌面环境
设置Xfce4为默认桌面环境:

update-alternatives --config x-session-manager

在弹出的选项中,选择/usr/bin/xfce4-session
4. 检查用户权限和配置文件
确保用户的家目录和配置文件的权限正确:

chmod 700 ~
chmod 600 ~/.Xauthority

如果.Xauthority文件不存在,可以尝试删除并重新登录:

rm ~/.Xauthority

5. 检查LightDM配置文件
检查LightDM的配置文件/etc/lightdm/lightdm.conf,确保配置正确。特别是greeter和session部分。例如:

[LightDM]
greeter-session=lightdm-gtk-greeter
session-directory=/usr/share/xsessions/

6. 检查Xfce4的.desktop文件
确保Xfce4的.desktop文件存在并且配置正确。这个文件通常位于/usr/share/xsessions/目录下,文件名为xfce.desktop。内容如下:

[Desktop Entry]
Encoding=UTF-8
Name=Xfce4
Comment=Use this session to run Xfce 4 as desktop environment
Exec=/usr/bin/startxfce4
Icon=/usr/share/pixmaps/xfce4_xicon1.png
Type=Application

7. 重启系统
完成上述步骤后,重启系统以应用更改:

sudo reboot

8. 登录时选择Xfce4会话
重启后,在登录界面,点击用户名旁边的按钮,选择"Xfce Session"选项,然后输入密码登录。
通过以上步骤,应该能够解决Xfce4桌面环境在LightDM下无法启动的问题。如果问题仍然存在,建议查看LightDM和Xorg的日志文件,以获取更多错误信息:
LightDM日志文件:/var/log/lightdm/lightdm.log
Xorg日志文件:/var/log/lightdm/x-0.log