> For the complete documentation index, see [llms.txt](https://kimhappy.gitbook.io/the-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kimhappy.gitbook.io/the-guide/reading/linux-command.md). Agents can also search and read this documentation through its [MCP server](https://kimhappy.gitbook.io/the-guide/~gitbook/mcp).

# 기초 Linux 명령어

이 섹션은 건너뛸 수 있습니다.

Linux에는 정말 많은 명령어와 그 사용법이 있습니다. 여기서는 많이 사용되는 명령어만 소개합니다.

* `ls`: 현재 디렉토리의 하위 파일 및 디렉토리 목록
* `cd`: 디렉토리 이동
  * `cd <name>`: `<name>`으로 이동
  * `cd ~`: 홈 디렉토리로 이동
  * `cd ..`: 상위 디렉토리로 이동
  * `cd -`: 이전 디렉토리로 이동
* `mkdir`: 디렉토리 생성
  * `mkdir <name1> <name2> ...`: `<name1>`, `<name2>`, ... 디렉토리를 생성
* `rmdir`: 디렉토리 삭제
  * `rmdir <name1> <name2> ...`: `<name1>`, `<name2>`, ... 디렉토리를 삭제
  * `rmdir -r ...`: 파일이 들어있는 디렉토리를 삭제
* `cp`: 파일 복사
  * `cp <name1> <name2>`: `<name1>`을 복사해서 `<name2>` 생성
  * `cp <name1> <name2> ... <dir>`: `<name1>`, `<name2>`, ...를 `<dir>`에 복사
  * `cp -r ...`: 파일 대신 디렉토리를 복사
* `cd`: 디렉토리 이동
* `mv`: 파일 이동
  * `mv <name1> <name2>`: `<name1>`의 이름을 `<name2>`로 변경
  * `mv <name1> <name2> ... <dir>`: `<name1>`, `<name2 >`, ...를 `<dir>`에 이동
* `rm`: 파일 삭제
  * `rm <name1> <name2>...`: `<name1>`, `<name2>`, ...를 삭제
  * `rm -r ...`: 디렉토리 삭제
* `sudo`: root 권한 부여
  * `sudo <command>`: root 권한으로 `<command>` 실행
