最近装了一个银河麒麟V10桌面版,将遇到的一些小问题整理一下。
镜像可到官网下载,银河麒麟官网https://www.kylinos.cn/
1. 使用root登录
默认桌面版不允许root登录,需要改配置,添加参数
greeter-show-manual-login=true #需要手工输入登录系统的用户名和密码
all-guest=false #禁止guest用户
执行以下命令,重启生效
vim /usr/share/lightdm/lightdm.conf.d/95-ukui-greeter.conf
[Seat:*]
greeter-session=ukui-greeter
user-session=ukui
greeter-show-manual-login=true
all-guest=false
设置root用户密码
sudo passwd root
vim /root/.profile 有一行修改为 tty -s && mesg n 2 || true
tty -s && mesg n 2> /dev/null || true
重启机器,使用root登录。
2. xshelll连接报错,使用root连接ssh
使用xshell连接提示,服务器发送了一个意外的数据包。received: 3,expected: 20
ssh -V #查看openssh版本
修改ssh配置文件,添加参数
KexAlgorithms +diffie-hellman-group-exchange-sha256,diffie-hellman-group1-sha1 #支持xshell连接
PasswordAuthentication yes #密码验证
PermitRootLogin yes #允许root登录
vim /etc/ssh/sshd_config
KexAlgorithms +diffie-hellman-group-exchange-sha256,diffie-hellman-group1-sha1
PasswordAuthentication yes
PermitRootLogin yes
重新加载配置生效。
systemctl reload sshd
2. 执行sh脚本,提示权限不够
原因:麒麟没有激活系统,输入命令经常提醒权限不够,无法通过管理员安装软件或运行有执行权限脚本。
默认开了安全导致,可用命令解除安全限制。
sudo setstatus softmode -p
3. 修改终端主机名颜色为紫色
写入环境变量
vim /etc/profile.d/env.sh
PS1="[\u@\[\e[1;35m\]\h\[\e[0m\] \W]\\$"
使变量生效
. /etc/profile.d/env.sh
4. 查看系统信息
cat /etc/.kyinfo
5. 更新软件源中的所有软件列表,然后dpkg -i 安装deb包
sudo apt-get update
6. 使用windows终端远程桌面连接银河麒麟系统
银河麒麟系统上安装vnc服务
sudo apt-get install tigervnc-*
桌面共享配置
启动vnc服务,第一次启动需要设置密码,这个密码被加密保存在家目录下(~/.vnc/passwd),默认监听端口5900
/usr/bin/vncserver
windows终端安装vnc客户端(下载地址https://download.csdn.net/download/weixin_45548465/87796290),连接麒麟系统桌面
6. 使用一段时间后,数据盘爆满,实际没放什么文件,可以清空家目录缓存(.cache)来释放空间
rm -rf /root/.cache
rm -rf /home/user/.cache