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

分类列表:


  1. 7z
  2. ab
  3. adb
  4. airport
  5. alias
  6. apk
  7. apparmor
  8. apt
  9. apt-cache
 10. apt-get
 11. aptitude
 12. aria2c
 13. ascii
 14. asciiart
 15. asciiart
 16. aspell
 17. asterisk
 18. at
 19. awk
 20. aws
 21. bash
 22. Bash-Snippets
 23. blktrace
 24. bower
 25. btrfs
 26. bzip2
 27. caffeinate
 28. carthage
 29. cat
 30. ccze
 31. cd
 32. cheat_readme
 33. chmod
 34. chown
 35. cp
 36. crontab
 37. cups
 38. cut
 39. date
 40. dd
 41. deb
 42. df
 43. dict
 44. diff
 45. diskutil
 46. dmesg
 47. docker
 48. du
 49. fdisk
 50. file
 51. find
 52. finger
 53. for
 54. function
 55. gcc
 56. git
 57. gzip
 58. head
 59. history
 60. htop
 61. iconv
 62. ifconfig
 63. imgcat
 64. jot
 65. ls
 66. more
 67. mount
 68. mv
 69. nc
 70. pwd
 71. question
 72. rename
 73. rename
 74. scp
 75. screen
 76. shutdown
 77. sleep
 78. sort
 79. ssh
 80. su
 81. tar
 82. unzip
 83. uptime
 84. wget
 85. xsel
 86. zip

腾图小抄 SCWY.net v0.03 小抄561条 自2022-01-02访问317984次