사용자:하늘/메모장/리눅스


Fail2Ban[편집 | 원본 편집]

https://blog.lael.be/post/1209

일정 횟수 실패하면 차단하는 프로그램. 쉘 보안 강화

유용한 GUI 도구 cpupower-gui yay -S cpupower-gui 아치 우분투

yay

기존 pacman의 archlinux 공식 패키지를 포함하여 커뮤니티 패키지(AUR)까지 관리할 수 있는 패키지 매니저 yay

그놈 문서에 작성 확장기능

Blur my Shell 그놈 쉘에 투명, 블러 효과를 준다.

cpufreq cpu 가버너 주파수 설정

Desktop Icons NG 바탕화면 아이콘 추가 우분투 기본 아이콘 확장기능

system-monitor 시스템 모니터를 트레이에 추가

systemd[편집 | 원본 편집]

$ systemctl start [service]

$ systemctl stop [service]

$ systemctl enable [service]

$ systemctl disable [service]

UFR II/UFRII LT Printer Driver[편집 | 원본 편집]

Fedora/Ubuntu/CentOS/Debian/UOS/Kylin OS/NeoKylin OS

아치 미지원 ㅋㅋ https://asia.canon/en/consumer/search?q=UFR+II%2FUFRII+LT+Printer+Driver&type=support

remove swap[편집 | 원본 편집]

Sometimes it can be prudent to reduce swap space after installation. For example, say you downgraded the amount of RAM in your system from 1 GB to 512 MB, but there is 2 GB of swap space still assigned. It might be advantageous to reduce the amount of swap space to 1 GB, since the larger 2 GB could be wasting disk space.

You have three options: remove an entire LVM2 logical volume used for swap, remove a swap file, or reduce swap space on an existing LVM2 logical volume. 5.3.1. Reducing Swap on an LVM2 Logical Volume

To reduce an LVM2 swap logical volume (assuming /dev/VolGroup00/LogVol01 is the volume you want to extend):

   Disable swapping for the associated logical volume:
   # swapoff -v /dev/VolGroup00/LogVol01
   Reduce the LVM2 logical volume by 512 MB:
   # lvm lvreduce /dev/VolGroup00/LogVol01 -L -512M
   Format the new swap space:
   # mkswap /dev/VolGroup00/LogVol01
   Enable the extended logical volume:
   # swapon -va
   Test that the logical volume has been reduced properly:
   # cat /proc/swaps # free

5.3.2. Removing an LVM2 Logical Volume for Swap

The swap logical volume cannot be in use (no system locks or processes on the volume). The easiest way to achieve this it to boot your system in rescue mode. Refer to for instructions on booting into rescue mode. When prompted to mount the file system, select Skip.

To remove a swap volume group (assuming /dev/VolGroup00/LogVol02 is the swap volume you want to remove):

   Disable swapping for the associated logical volume:
   # swapoff -v /dev/VolGroup00/LogVol02
   Remove the LVM2 logical volume of size 512 MB:
   # lvm lvremove /dev/VolGroup00/LogVol02
   Remove the following entry from the /etc/fstab file:
   /dev/VolGroup00/LogVol02   swap     swap    defaults     0 0
   Test that the logical volume has been extended properly:
   # cat /proc/swaps # free

5.3.3. Removing a Swap File

To remove a swap file:

   At a shell prompt as root, execute the following command to disable the swap file (where /swapfile is the swap file):
   # swapoff -v /swapfile
   Remove its entry from the /etc/fstab file.
   Remove the actual file:
   # rm /swapfile


namedpipe zip[편집 | 원본 편집]

# 파이프를 만듦
mkfifo pipe
# 파이프에 값을 집어넣고 zip은 파이프에서 꺼내서 압축
echo 'foo bar' > pipe & zip --fifo file.zip pipe
# 쓸모 없어진 파이프 삭제
rm pipe

docker db backup[편집 | 원본 편집]

#!/bin/bash

## yyyy-mm-dd_hh:mm format
DBNAME=ASDFASDF
TIMESTAMP=$(date "+%Y-%m-%d_%H:%M")
DUMP_NAME=$(echo ${DBNAME}dump-${TIMESTAMP})

docker exec wiki-mariadb sh -c 'mariadb-dump -u******* -p******** -v --single-transaction ******** | gzip -c > /*******/temp.sql.gz'
docker cp wiki-mariadb:/*********/temp.sql.gz /******/*******/${DUMP_NAME}.sql.gz
docker exec wiki-mariadb sh -c 'rm /*********/temp.sql.gz'

nvidia debian[편집 | 원본 편집]

설치는 가능 ASUS MUX 스위치가 있는 경우(추정) 드라이버 설치해도 화면이 깜빡여서 부팅해도 GUI도 안나오고 CLI조차 안되는 버그가 있다.

https://blog.desdelinux.net/ko/Debian-9-stretch%EC%97%90-%EA%B0%9C%EC%9D%B8%EC%9A%A9-nvidia-%EB%93%9C%EB%9D%BC%EC%9D%B4%EB%B2%84%EB%A5%BC-%EC%84%A4%EC%B9%98%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95/

NTFS 권한[편집 | 원본 편집]

NTFS 파티션에서 리눅스 파티션으로 복사할 때 권한이 망가짐.

find . -type d -print0 | xargs -r -0 chmod 0755

find . -type f -print0 | xargs -r -0 chmod 0644

find . -type -d -print0

목록 나열 (경로|파일) (한줄에 나)열