Posts
-
Feb 24, 2023
将父级目录权限设置为 771
子目录 拥有者用户组给用户
-
Feb 24, 2023
$ ls /proc
1 12850 174 24 3574 569 604 8833 cpuinfo interrupts kpagecount pagetypeinfo sysrq-trigger
10 12972 175 25 4 570 606 9 crypto iomem kpageflags partitions sysvipc
107 12978 18 255 445...
-
Feb 24, 2023
服务端:
$ groupadd git
$ useradd git -M -g git -s /sbin/nologin
$ mkdir -p /data/git
$ cd /data/git
$ git init --bare testrepo.git
useradd -s 指定用户登录后使用的shell
useradd -M not create home 不创建home目录
客户端:
$ git clone root@aliyun:/data/git/testrepo.g...
-
Feb 24, 2023
find -type d|xargs chmod 755
find -type f|xargs chmod 644
上面这个命令如果碰到带有空格的文件名会出错
find . -type d -exec chmod -fv 755 {} \;
find . -type f -exec chmod -fv 644 {} \;
https://askubuntu.com/questions/604489/what-are-the-default-permissions-of-direc...
-
Feb 24, 2023
查看磁盘分区
$ sudo fdisk -l
[sudo] password for debian:
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WDS100G0000-000000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 51...
-
Feb 24, 2023
方法1:为用户单独添加 sudo 权限
echo "debian ALL=(ALL:ALL) ALL" > /etc/sudoers.d/debian
方法2:将用加入 sudo 用户组
root@debian:~# id debian
uid=1000(debian) gid=1000(debian) groups=1000(debian),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev)...
-
Feb 24, 2023
设置时区
echo "\nTZ='Asia/Shanghai'; export TZ" >> ~/.bash_aliases
source ~/.bash_aliases
-
Feb 24, 2023
安装拼音输入法
sudo apt-get install ibus-libpinyin
-
Feb 24, 2023
添加 non-free 源
vi /etc/apt/sources.list
deb http://mirrors.163.com/debian/ bullseye main contrib non-free
deb-src http://mirrors.163.com/debian/ bullseye main contrib non-free
安装Nvidia 驱动
sudo apt-get install firmware-misc-nonfree nvidia-dete...
-
Feb 24, 2023
安装 Ax200 驱动
sudo apt install firmware-iwlwifi bluez
sudo reboot
如果蓝牙有问题参考下面的错误排查方法:
bluetoothctl show
# 如果显示 No default controller available 则表示没有驱动起来
# 查看蓝牙情况
dmesg | grep blue
# 我这里显示
# bluetooth hci0: Direct firmware load for intel/ibt-20-1...