(1) 경로(path) : /(슬래쉬) 사용해서 폴더 경로 표시함
예) /home/oracle => home 밑에 oracle 폴더
(vs 윈도우 명령프롬프트 : (역슬러쉬))
(2) 경로의 최상위 경로 : / => 루트(root) 경로
(3) 리눅스를 설치하면 시스템 폴더(관리 폴더)
/bin : 주요 명령어 들이 있는 폴더
/etc : 계정, 그룹, 패스워드 등의 환경설정 파일 있음
/home: 계정별로 할당되는 작업폴더
/sbin: 슈퍼 관리자가 사용하는 명령어들 있음
(컴퓨터 끄기, 켜기 등)
/tmp : 임시파일이 잠시 머무르는 폴더
/usr : 설치된 프로그램이 있는 폴더
/var : 로그(접속, 시스템감시 등)가 있는 폴더
pwd
예) /home/oracle, /home 등
. : 현재 있는 경로
.. : 상위 경로
예) ./ , ../usr : 상위 경로(폴더) 이동해서 usr 들어가기
예제 1) /usr 경로 이동
사용법 : cd 경로
cd == Change directory
oracle@cd10cec9dac9:~$ cd /usr
oracle@cd10cec9dac9:/usr$ pwd
/usr
oracle@cd10cec9dac9:/usr$
사용법 : ls
: 간략하게 목록 보기(파일, 폴더 등)
oracle@cd10cec9dac9:/usr$ ls
bin games include lib local sbin share src사용법 : ls -lF
-l : 자세하게보기
-F : 폴더에 / 붙여서 출력하기
-a : 숨긴파일까지 모두 보기
oracle@cd10cec9dac9:/usr$ ls -lF
total 40
drwxr-xr-x 1 root root 4096 Feb 20 21:01 bin/
drwxr-xr-x 2 root root 4096 Apr 24 2018 games/
drwxr-xr-x 1 root root 4096 Feb 20 20:43 include/
drwxr-xr-x 1 root root 4096 Feb 20 21:01 lib/
drwxr-xr-x 1 root root 4096 May 30 2023 local/
drwxr-xr-x 1 root root 4096 Feb 20 21:01 sbin/
drwxr-xr-x 1 root root 4096 Feb 20 21:01 share/
drwxr-xr-x 2 root root 4096 Apr 24 2018 src/
oracle@cd10cec9dac9:/usr$
사용법: ls 경로
oracle@cd10cec9dac9:~$ ls /usr
bin games include lib local sbin share src
oracle@cd10cec9dac9:~$
tab 키
oracle@cd10cec9dac9:~$ cd /usr/lo => (tad키 클릭) ---> cd /usr/local/ (자동완성됨)
oracle@2d5f598932bb:/usr/local$ cd /usr/lib
oracle@2d5f598932bb:/usr/lib$ ls
apt gcc mime python3.6 sudo tmpfiles.d
dpkg git-core openssh sasl2 systemd x86_64-linux-gnu
file locale os-release ssl tar
oracle@2d5f598932bb:/usr/lib$
1) 이동 : cd /home/oracle
2) ~ : cd ~
oracle@cd10cec9dac9:~$ pwd
/home/oracle
oracle@cd10cec9dac9:~$
사용법 : cd -
oracle@2d5f598932bb:~$ pwd
/home/oracle
oracle@2d5f598932bb:~$ cd -
/usr/lib
oracle@2d5f598932bb:/usr/lib$ pwd
/usr/lib
사용법 : cd ~/report
oracle@2d5f598932bb:~$ mkdir report
oracle@2d5f598932bb:~$ ls
report
oracle@2d5f598932bb:~$ pwd
/home/oracle
oracle@2d5f598932bb:~$ cd /usr
oracle@2d5f598932bb:/usr$ pwd
/usr
oracle@2d5f598932bb:/usr$ cd ~/report
oracle@2d5f598932bb:~/report$ pwd
/home/oracle/report
oracle@2d5f598932bb:~/report$
사용법 : cd ..
oracle@2d5f598932bb:~$ cd .. oracle@2d5f598932bb:/home$ pwd /home oracle@2d5f598932bb:/home$
사용법 : ls b*
oracle@2d5f598932bb:/home$ cd /usr/bin oracle@2d5f598932bb:/usr/bin$ ls b* b2sum base32 base64 basename bashbug oracle@2d5f598932bb:/usr/bin$
oracle@2d5f598932bb:/usr/bin$ ls base?? base32 base64 oracle@2d5f598932bb:/usr/bin$
oracle@2d5f598932bb:~$ ls -l
total 4
drwxr-xr-x 2 oracle dba 4096 Feb 21 06:03 report
oracle@2d5f598932bb:~$