【apparmor】 高效易用的Linux安全应用程序【linux】
激活配置文件
sudo aa-enforce usr.bin.firefox
或者
export _PROFILE_='usr.bin.firefox' sudo $(rm /etc/apparmor.d/disable/$_PROFILE_ ; cat /etc/apparmor.d/$_PROFILE_ | apparmor_parser -a )
禁用配置文件
sudo aa-disable usr.bin.firefox
或者
export _PROFILE_='usr.bin.firefox' sudo $(ln -s /etc/apparmor.d/$_PROFILE_ /etc/apparmor.d/disable/ && apparmor_parser -R /etc/apparmor.d/$_PROFILE_)
列出已加载的配置文件
sudo aa-status
或者
sudo apparmor_status
【dmesg】 显示linux内核的环形缓冲区信息【linux】
清除dmesg缓冲区日志
dmesg -c
以可读格式显示本地时间和增量。转换为当地时间可能不准确
dmesg -e
打印可读的时间戳
dmesg -T
可读输出(颜色+重新计时)
dmesg -H
显示内存、硬盘、USB、TTY相关的信息
dmesg | grep -i memory
dmesg | grep -i dma
dmesg | grep -i usb
dmesg | grep -i tty
输出守护进程的信息
dmesg --facility=daemon
只输出特定级别的信息
dmesg --level=err,warn
默认输出的信息是处理过的,想要显示原始数据(raw data)
dmesg -r
【pi】 Raspberry Pi(中文名为“树莓派”,简写为RPi,只有信用卡大小的微型电脑,其系统基于Linux【pi】
官方网站
历代产品:
【lshw】 Get hardware information on Linux【linux】
lshw
Get hardware information on Linux
Generate full information report about all detected hardware
lshw
Display hardware information in short
lshw -short
Display only memory information
lshw -short -class memory
Display processor information
lshw -class processor
Display the disk drives with the disk class
lshw -short -class disk
Display information about the partitions and controllers also,
specify the storage and volume class along with the disk class
lshw -short -class disk -class storage -class volume
Network adapter information
lshw -class network
Display the address details of pci, usb, scsi and ide devices
lshw -businfo
Generate report in html format
lshw -html > hardware.html
Generate report in xml format
lshw -html > hardware.html
【sgdisk】 Command-line GUID partition table (GPT) manipulator for Linux and Unix【linux】
convert an MBR partition table to GPT, use sgdisk
sgdisk -g /dev/sda
convert GPT to MBR use the m option.
it is not possible to convert more than four partitions from GPT to MBR
sgdisk -m /dev/sda
Sort GPT partitions
when a new partition is created in the space between two partitions or a partition is deleted
sgdisk -s /dev/sda
Using sgdisk you can create a binary backup consisting of the protective MBR,
the main GPT header, the backup GPT header, and one copy of the partition table
sgdisk -b=sgdisk-sda.bak
Restore GPT/MBR backup:
sgdisk -l=sgdisk-sda.bak
Clone your current device's partition layout '/dev/sda' to another drive '/dev/sdc'
sgdisk -R=/dev/sdc /dev/sda
If both drives will be in the same computer, you need to randomize the GUID's after cloning
sgdisk -G /dev/sdc
分类列表:
腾图小抄 SCWY.net v0.03 小抄561条 自2022-01-02访问317984次