Ubuntu日常配置

Ubuntu日常配置

简介

日常使用ubuntu的一些记录。

日常使用

1. windows/ubuntu双系统时间不一致问题

windows/ubuntu双系统中,由于两者对主板默认时钟定义不一致(windows默认主板时钟为:当地时间(RTC),ubuntu默认主板时钟为:UTC协调世界时间),导致两个系统显示的时间不一致。

修改方式可以为:

1
2
## 将ubuntu系统时钟时间设为本地时钟
$ timedatectl set-local-rtc 1 --adjust-system-clock

2. 使用autofs自动挂载目录

可以使用autofs可自动挂载分区或网络磁盘到某一目录中

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 安装autofs

$ sudo apt install autofs

## 修改配置, 总共修改2个配置文件

### 1. 在/etc/auto.master中增加一行:
/mnt/auto/    /etc/auto.share --timeout=600 --ghost

### 2. 在/etc/auto.share 中增加自动挂载子目录
smb -fstype=cifs,rw,noperm,uid=1000,gid=1000,username=guest,password= ://<serverip>/<dir>

## 注意:/mnt/auto/目录要提前建立, 且为空

3. 机械革命无界14pro ubuntu wifi无法启动的问题

机械革命无界14pro(无线网卡型号intel ax200)在安装ubuntu24.04版本后, 其wifi无法正常打开, 使用如下命令查看:

1
2
3
4
5
6
7
8
$ rfkill list all
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes

显示WiFi被硬件阻止了.

解决方法:

使用透明胶带将如图红色pin54,pin56引脚粘住屏蔽即可.

4. 更换ubuntu软件源

更换清华源:

https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

/etc/apt/sources.list 和 /etc/apt/sources.list.d/ubuntu.list 两个文件设置一个即可

参考

  1. Ubuntu 22.04 和 Windows 时间冲突解决方案 - Ofnoname - 博客园
  2. https://3os.org/linux/smb-mount-autofs/
  3. https://forum.radxa.com/t/installed-intel-ax200-but-it-is-hard-blocked/20644/3
  4. https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
updatedupdated2025-02-102025-02-10