본문 바로가기

운영체제

(84)
ps -o 옵션 1. ps -o 옵션 확인 ps: option requires an argument -- o usage: ps [ -aAdefHlcjLPyZ ] [ -o format ] [-O format ] [ -t termlist ] [ -u userlist ] [ -U userlist ] [ -G grouplist ] [-h lgrplist ] [ -p proclist ] [ -g pgrplist ] [ -s sidlist ] [ -z zonelist ] 'format' is one or more of: user ruser group rgroup uid ruid gid rgid pid ppid pgid sid psr lwp lname nlwp opri pri f s c pcpu pmem osz vsz rss rss..
shell script - array ip.list 파일 192.168.0.175 user userpassword rootpassword 192.168.0.176 user userpassword rootpassword connect.sh 파일 linecount=`cat ip.list | wc -l` IP=(`cat ip.list | awk '{print $1}'`) USER=(`cat ip.list | awk '{print $2}'`) PASS=(`cat ip.list | awk '{print $3}'`) PASS2=(`cat ip.list | awk '{print $4}'`) for (( i=0; i
Device /dev/sdb excluded by a filter. [root@nb015 lvm]# pvcreate /dev/sdb Device /dev/sdb excluded by a filter. [root@nb015 lvm]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 centos lvm2 a--
예제로 알아보는 sed 명령어 sample 파일 내용 1 2 3 4 5 6 7 8 9 10 11 [fruit] apple 1000 banana 2000 [animal] dog 12000 cat 5000 [car] bmw 40000 Benz 50000 예) 1에서 3행 출력 > sed -n '1,3p' sample 1 2 3 [fruit] apple 1000 banana 2000 예) 1~3행, 9~11 행 출력(다중 조건은 -e 옵션 사용) > sed -n -e '1,3p' -e '9,11p' sample 1 2 3 4 5 6 [fruit] apple 1000 banana 2000 [car] bmw 40000 Benz 5000 예) 공백라인제거 > sed '/^$/d' sample 1 2 3 4 5 6 7 8 9 [fruit] app..
gnome-initial-setup disable 개요 시스템 부팅 시 기존(일반) 사용자가 없으면 gnome-initial-setup 응용 프로그램이 자동으로 시작됩니다. 일반 사용자가 필요 없는 경우 새로 설치된 시스템에서 그놈 초기 설정 창(gnome-initial-setup)을 비활성화하는 방법에 대해 알아본다 환경 Redhat 7,8,9 / CentOS 7,8 1. /etc/gdm/custom.conf 파일에 아래 라인 추가 [daemon] InitialSetupEnable = false 2. gdm 서비스 재시작 또는 run level 변경 # systemctl restart gdm.service Or # init 3 # init 5 참조: https://access.redhat.com/solutions/2180841
nmcli 를 이용한 bonding 구성 구성 환경 redhat(centos)에서 nmcli 를 이용한 bonding(mode 4, LACP) 구성 준비 nmcli를 사용하기 위해서는 NetworkManager 서비스가 실행중이어야 한다 > systemctl status NetworkManager > systemctl enable NetworkManager > systemctl start NetworkManager 1. bonding 인터페이스 생성 > nmcli connection add type bond con-name bond0 ifname bond0 bond.options "mode=4,miimon=100" 'bond0' (4e82d3ae-3103-4c0d-b988-f658a26db086) 연결이 성공적으로 추가되었습니다. 2. 확인 >..
nftables를 사용하여 SNAT 구성 구성환경 Redhat 8.4 1. nftables 활성화 > systemctl enable nftables.service > systemctl start nftables.service 2. nft ruleset 제거 > nft flush ruleset 3. nftables 리스트 > nft list ruleset 4. SNAT(외부 인터페이스(ens160) 의 IP(192.168.0.175)로 SNAT 처리) > nft add table nat > nft add chain nat WORKER_OUT { type nat hook postrouting priority 100 \; } > nft add rule nat WORKER_OUT oifname "ens160" snat to 192.168.0.175 5..
리눅스 부팅 커널 변경 및 커널 업그레이드 1.설치전 요구사항 /boot 용량 100M 이상 여유가 있는지 확인 2. 부팅 환경 파일 /boot/grub2/grub.cfg ==> bios 환경 /boot/efi/EFI//grub.cfg ==> efi 환경 3. 디폴트 부팅 커널 변경 방법 3.1 부팅 커널 목록 확인(efi 환경) > awk -F\' '$1=="menuentry " {print $2}' /boot/efi/EFI/centos/grub.cfg ==> centos > awk -F\' '$1=="menuentry " {print $2}' /boot/efi/EFI/redhat/grub.cfg ==> redhat ** bios 환경일 경우 /boot/grub2/grub.cfg 3.2 디폴트 커널 변경 방법1) > grub2-set-defau..