lsitab 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-lsitab
핵심 정리
/etc/inittab의 레코드를 보여 줍니다.lsitab -a는 모두,lsitab 식별자는 그 레코드 하나입니다.- 레코드 형식은
Identifier:RunLevel:Action:Command입니다. - 부팅 때 무엇이 실행되는지 볼 때
cat /etc/inittab대신 쓰면 주석 줄 없이 실제 레코드만 볼 수 있습니다. - 레코드를 더하거나 바꾸거나 지울 때는
mkitab,chitab,rmitab을 씁니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1 문서에 RBAC 보안 안내가 더해짐. 사용법은 같음) |
| 원문 | IBM Commands Reference — 5.3 Volume 3, 6.1 Volume 3 |
| 파일 | /usr/sbin/lsitab, /etc/inittab |
| 관련 명령어 | mkitab, chitab, rmitab, init, telinit |
목적
/etc/inittab 파일의 레코드를 나열합니다.
영어 원문
Lists records in the /etc/inittab file.
구문
lsitab { -a | Identifier }
설명
lsitab 명령은 /etc/inittab 파일의 레코드를 보여 줍니다. 모든 레코드를 보거나, Identifier 매개변수로 특정 레코드를 볼 수 있습니다. Identifier는 객체를 하나로 구분하는 14자 필드입니다.
/etc/inittab 레코드는 Identifier:RunLevel:Action:Command 형식입니다.
| 필드 | 뜻 |
|---|---|
| Identifier | 레코드를 하나로 구분하는 14자 이내의 이름. 겹치면 실패하며, 바꿀 수 없습니다(바꾸려 하면 실패). |
| RunLevel | 이 레코드를 처리할 실행 수준(20자 이내). init이 시작하는 프로세스마다 실행 수준을 하나 이상 줄 수 있습니다. |
| Action | init이 Command를 어떻게 처리할지 알려 주는 값(20자 이내, 아래 표). |
| Command | 실행할 셸 명령(1024자 이내). |
영어 원문
The lsitab command displays a record in the /etc/inittab file. You can display all of the records in the /etc/inittab file, or use the Identifier parameter to display a specific record. The Identifier parameter is a 14-character field that uniquely identifies an object.
플래그
| 플래그 | 설명 |
|---|---|
-a |
/etc/inittab의 모든 레코드를 나열합니다. |
영어 원문
-a— Specifies that all records in the /etc/inittab file are listed.
보안
RBAC 사용자와 Trusted AIX 사용자는 주의하세요. 이 명령은 특권 작업을 할 수 있으며, 특권 작업은 특권 사용자만 할 수 있습니다. 특권과 권한 목록은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다(6.1 문서에만 있음).
영어 원문
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
예제
tty2의 레코드를 봅니다.
lsitab "tty002"
출력은 다음과 비슷합니다.
tty002:2:respawn:/usr/sbin/getty /dev/tty2
/etc/inittab의 모든 레코드를 봅니다.
lsitab -a
자주 쓰는 형태:
lsitab -a | grep -v ":off:" # 꺼 두지 않은 레코드
lsitab init # 기본 실행 수준(initdefault) 레코드
lsitab srcmstr # SRC 마스터 데몬 레코드
영어 원문
- To display the record for
tty2, enter:lsitab "tty002"
The output is similar to: tty002:2:respawn:/usr/sbin/getty /dev/tty2
- To display all of the records in the /etc/inittab file, enter:
lsitab -a
All of the records in the /etc/inittab file are displayed.
파일
| 파일 | 설명 |
|---|---|
/etc/inittab |
init 명령이 시작할 프로세스를 나타냄 |
영어 원문
- /etc/inittab — Indicates which processes the init command starts.
Related reference:
- mkitab Command
Related information:
- chitab command
- init command
- rmitab command
리눅스(GNU)와 다른 점
리눅스는 대부분 systemd를 써서 /etc/inittab이 없거나 쓰이지 않습니다. 부팅 때 실행할 것은 systemd 단위(systemctl enable), 다시 살리는 서비스는 단위의 Restart=always, 기본 실행 수준은 systemctl set-default multi-user.target으로 정합니다. SysV init을 쓰는 오래된 배포판에서는 /etc/inittab을 편집기로 직접 고치고 telinit q로 다시 읽게 합니다.