ILD

linux user and group
2024-9-24
linux用户信息存储在/etc/passwd、/etc/shadow文件里面。linux组信息存储在/etc/group里面。/etc/passwd用来存储用户除密码以外的信息。一行一个用户。比如:1234567# cat /etc/passwdroot:x:0:0:root:/root:/bin

uuid vs partuuid
2024-9-24
UUID是文件系统的UUID。PARTUUID是分区表中一个分区的UUIDPTUUID是分区表的UUID。通过uuid查看所有分区:$ ls /dev/disk/by-uuid/ -ltotal 0lrwxrwxrwx 1 root root 10 Sep 24 16:16 252db272-12c

use file check filesystem type of a partition
2024-9-24
# file -sL /dev/sdc1/dev/sdc1: BTRFS Filesystem label "nas_btrfs", sectorsize 4096, nodesize 16384, leafsize 16384, UUID=9cdc57ce-05f5-47b3-a7eb-4b1d5

blockdev command
2024-9-26
blockdev是util-linux里面的一个命令,用来通过命令行对块设备进行ioctl。blockdev - call block device ioctls from the command line用途1:报告块设备信息# blockdev --report /dev/sdcRO RA

uart & tty program
2024-10-15
uart设备的读写,和普通的文件读写没有啥不同,都是open/read/write。uart参数的设置,有两种接口,一个是ioctl()接口,一个是termios(3)描述的POSIX接口。有两个结构体用来描述terminals and serial lines。struct termiosstru

read/write device register at kernel boot stage
2024-10-25
背景最近在给一个aarch64的soc移植最新的内核,内核串口日志还看不到,需要在启动过程中添加日志,可以通过读写gpio来显示led灯,或者设置uart寄存器输出字符的方式进行调试 。例如uart输出字符,代码如下,需要通过读写设备寄存器来实现。123456789#define THR (

file name length statistics under a directory
2024-11-7
下面这个结构体用来存储文件名(不包括路径)struct qstr{ union { char name_arr[31]; char *name_ptr; } __attribute__((packed));

btrfs reuse inode number
2024-11-7
btrfs有一个选项inode_cache,可以使用已经释放的inode number。但是这个选项已经从5.11内核中被删除了。现在btrfs中的inode id会一直增长。因为是64位系统,想要用完是比较难的,但是在32位系统上,就不咋好使了。btrfs: start deprecation o

windows remote desktop for lan
2024-11-13
局域网内两台windows电脑,其中一台控制另外一个台,可以通过windows自带的远程桌面连接。允许远程连接第一步,在被控制的电脑上允许远程连接。从 “我的电脑” - “属性” - “高级系统设置”,打开“系统属性”选项卡也可以 windows + R,输入sysdm.cpl,打开“系统属性”选项

disable linux gui
2024-11-13
在笔记本上,创建了一个fedora 41的虚拟机,分配了2G内存。安装后,启动,发现内存严重不足:$ free total used free shared buff/cache availableMem: 19

Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.