日常使用ubuntu的一些记录。
windows/ubuntu双系统中,由于两者对主板默认时钟定义不一致(windows默认主板时钟为:当地时间(RTC),ubuntu默认主板时钟为:UTC协调世界时间),导致两个系统显示的时间不一致。
修改方式可以为:
1
2
| ## 将ubuntu系统时钟时间设为本地时钟
$ timedatectl set-local-rtc 1 --adjust-system-clock
|
可以使用autofs可自动挂载分区或网络磁盘到某一目录中
1
2
3
4
5
6
7
8
9
10
11
| ## 1. 安装autofs
$ sudo apt install autofs
## 2. 建立两个配置文件:
### /etc/auto.master.d/mnt.autofs:
/- /etc/auto.mnt --timeout=600 --ghost
### /etc/auto.mnt:
/mnt/smb -fstype=cifs,rw,noperm,uid=1000,gid=1000,username=guest,password= ://<serverip>/<dir>
/mnt/data -fstype=auto,rw :/dev/disk/by-label/data
/mnt/media -fstype=ntfs,rw,uid=1000,gid=1000 :/dev/disk/by-label/media
|
机械革命无界14pro(无线网卡型号intel ax200)在安装ubuntu24.04版本后, 其wifi无法正常打开, 使用如下命令查看:
1
2
3
4
5
6
7
| $ 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引脚粘住屏蔽即可.

更换清华源:
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
/etc/apt/sources.list 和 /etc/apt/sources.list.d/ubuntu.list 两个文件设置一个即可
在~/.inputrc中增加如下行
1
2
3
| # ~/.inputrc
set enable-bracketed-paste off
|
1
2
| ## 将默认shell改为zsh, 执行后重启才能生效
$ chsh -s $(which zsh)
|
1
2
| $ sudo mv /usr/share/plymouth/ubuntu-logo.png /usr/share/plymouth/ubuntu-logo.png.bak
$ sudo mv /usr/share/plymouth/theme/spinner/watermark.png /usr/share/plymouth/themes/spinner/watermak.png.bak
|
1
2
3
4
5
| ## 压缩
$ tar -zcf - hello/ | split -d -b 100m - hello.tar.gz.
## 解压
$ cat hello.tar.gz.* | tar -zxf -
|
- Ubuntu 22.04 和 Windows 时间冲突解决方案 - Ofnoname - 博客园
- https://3os.org/linux/smb-mount-autofs/
- https://forum.radxa.com/t/installed-intel-ax200-but-it-is-hard-blocked/20644/3
- https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/