Skip to content

내가 매일 까먹어서 만드는 리눅스 명령어

Notifications You must be signed in to change notification settings

Coen90/linux-cli-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

linux-cli-command

내가 매일 까먹어서 만드는 리눅스 명령어

linux filesystem

  • 시스템 제어
    • 서비스 목록 확인(unit file, state)
# systemctl list-unit-files
  • 서비스 목록 확인(UNIT, LOAD, ACTIVE, SUB, DESCRIPTION) 패턴예시(--type=service --state=active)
# systemctl list-units [PATTERN...]
  • 서비스 시작 | 종료 | 재시작 | 활성화 | 비활성화 | 갱신
# systemctl start | stop | restart | enable | disable | reload [서비스명]

alias command(잘 안됨, 알아보자)

# vim ~/.bashrc

add below on .bashrc

alias running_services='systemctl list-units  --type=service  --state=running'

then you can use running_services command

Need to organize command below

  • linux version
# cat /etc/redhat-release
  • make directory
# mkdir [파일명]
  • make user
# mkdir /app
# groupadd app
# useradd -g app -d /app/docker docker
# passwd docker
# su - docker  (사용자 변경)
# id (확인)
# exit (logout)
  • add user authentication(on root account)
# chmod u+w /etc/sudoers
# vi /etc/sudoers
##Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
docker  ALL=(ALL)       ALL (add this line)
docker  ALL=(ALL)       NOPASSWD: ALL (if you don't want to lock)

About

내가 매일 까먹어서 만드는 리눅스 명령어

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published