ubuntu安装N卡驱动The Nouveau kernel driver is currently in use by your system

创建文件
1
2
3
4
vi /etc/modprobe.d/blacklist-nouveau.conf

blacklist nouveau
options nouveau modeset=0

阅读全文

ubuntu开启ssh root密码登录

修改 root 密码
1
2
sudo -i  #切换到root
passwd #修改密码

阅读全文

ubuntu磁盘空间扩容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
df -h

Filesystem Size Used Avail Use% Mounted on
udev 7.7G 0 7.7G 0% /dev
tmpfs 1.6G 1.6M 1.6G 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 438G 38G 380G 10% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/sdb2 976M 509M 401M 56% /boot
/dev/sdb1 511M 7.9M 504M 2% /boot/efi
/dev/loop0 56M 56M 0 100% /snap/core18/1944
/dev/loop1 70M 70M 0 100% /snap/lxd/19188
/dev/loop2 56M 56M 0 100% /snap/core18/1997
/dev/loop3 68M 68M 0 100% /snap/lxd/20326
/dev/loop4 33M 33M 0 100% /snap/snapd/11588
/dev/loop5 32M 32M 0 100% /snap/snapd/10707
overlay 438G 38G 380G 10% /var/lib/docker/overlay2/099fd9c0432112e7161a82a5db639648e4e6b154aabdcde39c7c43b0aa3ab1cc/merged
tmpfs 1.6G 0 1.6G 0% /run/user/0

阅读全文

ubuntu安装r8125网卡2.5G驱动

网上很多说要去编译驱动其实使用5.10以上内核就可以
1
2
3
4
linux-headers-5.10.0-051000_5.10.0-051000.202012132330_all.deb
linux-headers-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb
linux-image-unsigned-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb
linux-modules-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb

阅读全文

nvidia-docker2安装

1、设置源和key

1
2
3
4
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list \
&& curl -s -L https://nvidia.github.io/nvidia-container-runtime/experimental/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list

阅读全文

grub加密码

1、 生成密码

1
2
3
4
5
6
grub-mkpasswd-pbkdf2

Enter password: 123123
Reenter password: 123123
PBKDF2 hash of your password is grub.pbkdf2.sha512.10000.932D9701F404A1EFB254E02DFE7690F8CD41173588ADC409DD221EC82A522032AFC4F12AFD39477B63A31AF707CE18711AB186D1917B692C0FAC3463B52C2369.EB7CEB80172F3B55C52A405C89507F1113BFD24CF3F5585295274351D22CC53AB23A7F9FC26105F08300DE5B0763704D3F0400649127365AE2681F982441A163

阅读全文

ubuntu硬盘分区挂载

1、查询硬盘信息

1
2
3
4
5
6
7
8
fdisk -l

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0153111b

阅读全文

Linux iotop io 性能查看

1、安装

1
apt install iotop

阅读全文

Linux iostat io 性能查看

1、安装

1
apt install sysstat

阅读全文

Ubuntu18.04开机启动脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
vi /lib/systemd/system/rc.local.service

[Unit]
Description=/etc/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
RemainAfterExit=yes


阅读全文