Linux(UNIX) 필수 명령어

BERT·2023년 3월 21일
0

Linux

목록 보기
8/24

Command completion

명령행 완성 기능
TAB

i18n

internationalization
UTF-8이 기본문자세트로 사용
LANG 환경변수 설정의 영향 받음
en_US locale 사용하는 편이 좋음

Linux basic commands

메뉴얼

man

파일 관련

path
pwd cd pushd/popd

file data / meta-data
조회 : ls file stat tree which find locate
데이터 변경 : cp mv rm mkdir/rmdir ln readlink
메타 변경 : chmod chown chgrp chattr/lsattr

파일 묶음

archive : tar cpio

압축

compress : gzip bzip2 xz lz4 zstd

Text 관련

editor : vim nano emacs
filter : cat head tail less more sort uniq
regex : grep(egrep fgrep) sed awk

Job control

jobs fg bg disown

Process control

kill pkill pgrep killall
tracing : strace pmap

Networking

nc curl wget
w

Disk

df disk free
du disk usage 사용 금지

Linux admin commands

System

uptime free smem
process summary : top htop atop sar saidar
preocess status : ps pstree
stat : vmstat iostat mpstat pidstat statgrab dstat
hardware : lshw lspci lsusb

Package

RedHat : rpm yum dnf
Debian : dpkg apt-get/apt-cache/apt-file apt aptitude

Network

status : ss
config : nmcli/nmtui ip ifconfig iw/iwconfig
arp dig
ssh sftp scp ssh-copy-id
packet : tcpdump wireshark tshark

Files

open files : lsof fuser

Kernel

커널 파라미터 : sysctl
커널 모듈 : lsmod modprobe rmmod

Firewall

iptables ip6tables
firewall-cmd ufw

Disks

fdisk cfdisk sfdisk fixparts flock
parted gdisk cgdisk sgdisk
mkfs fsck
mount lsblk blkid
grubby grub2-install grub2-mkconfig grub2-editenv
lvs vgs pvs
udisksctl

Security

ulimit
visudo
sestatus getsebool setsebool getenforce setenforce
abrt

User

useradd groupadd usermod groupdel chgrp newgrp
passwd chpasswd gpasswd

Service

init service chkconfig ntsysv update-rc
systemctl

Performance

tuned-adm
perf
pcp

Locale

locale localectl

Alternatives

update-alternatives

Linux dev.

Compiler

gcc g++ clang

Debugging, tracing

gdb strace coredumpctl

Tools

make maven graddle
git

python

python2 pip
python3 pip3

Command

CTRL +D : exit
CTRL +L : clear

0개의 댓글