CLI(명령줄 인터페이스)란 무엇입니까?


C:\>npm install mysoftware

CLI 는 다음을 나타냅니다.

  • 명령줄 인터페이스
  • 명령줄 해석기
  • 명령줄 입력

명령줄 입력

CLI는 운영 체제 기능을 실행하기 위해 텍스트 입력을 허용하는 명령줄 프로그램입니다.

1960년대에는 컴퓨터 단말기만 사용하여 컴퓨터와 상호 작용하는 유일한 방법이었습니다.

1970년대와 1980년대에 명령줄 입력은 Unix 시스템과 MS-DOS 및 Apple DOS와 같은 PC 시스템에서 일반적으로 사용되었습니다.

오늘날 GUI(그래픽 사용자 인터페이스)를 사용하는 대부분의 사용자는 CLI(명령줄 인터페이스)를 사용하지 않습니다.

그러나 CLI는 여전히 소프트웨어 개발자와 시스템 관리자가 컴퓨터를 구성하고 소프트웨어를 설치하며 그래픽 인터페이스에서 사용할 수 없는 기능에 액세스하는 데 사용됩니다.


소프트웨어 패키지 관리자 npm 은 명령줄 입력을 사용하여 소프트웨어를 설치합니다.

Windows 예

C:\>npm install mysoftware

맥 OS 예

>npm install mysoftware

명령줄 명령을 사용하여 폴더(디렉토리)를 탐색할 수 있습니다.

Windows 예

C:\Users\myuser>cd ..
C:\Users\>cd ..
C:\>

CLI 명령을 주의해서 사용하십시오!!!

잘못된 사용은 파일을 쉽게 삭제하거나 컴퓨터 시스템을 완전히 파괴할 수 있습니다.


기본 Linux CLI 명령

명령설명
디렉토리(폴더) 시스템을 나열합니다.
CD 경로 이름파일 시스템에서 디렉토리(폴더)를 변경합니다.
CD ..파일 시스템에서 한 수준 위로(한 폴더) 이동합니다.
cp파일을 다른 폴더에 복사합니다.
뮤직비디오파일을 다른 폴더로 이동합니다.
mkdir새 디렉토리(폴더)를 생성합니다.
rmdir디렉토리(폴더)를 제거합니다.
분명한CLI 창을 지웁니다.
출구CLI 창을 닫습니다.
남자 명령주어진 명령에 대한 매뉴얼을 보여줍니다.

기본 Windows CLI 명령

명령설명
너에게디렉토리(폴더) 시스템을 나열합니다.
CD 경로 이름파일 시스템에서 디렉토리(폴더)를 변경합니다.
CD \파일 시스템의 루트 폴더로 이동합니다.
CD ..파일 시스템에서 한 수준 위로(한 폴더) 이동합니다.
복사파일을 다른 폴더에 복사합니다.
이동하다파일을 다른 폴더로 이동합니다.
파일 이름 입력파일을 입력합니다.
mkdir 또는 md새 디렉토리(폴더)를 생성합니다.
rmdir 또는 rd디렉토리(폴더)를 제거합니다.
클스CLI 창을 지웁니다.
출구CLI 창을 닫습니다.
도움말 명령주어진 명령에 대한 매뉴얼을 보여줍니다.

DOS 명령 도움말

help 명령으로 사용 가능한 모든 명령을 표시할 수 있습니다.

예시

C:\Users\myuser>help
ASSOC Displays or modifies file extension associations.
ATTRIB Displays or changes file attributes.
BREAK Sets or clears extended CTRL+C checking.
BCDEDIT Sets properties in boot database to control boot loading.
CACLS Displays or modifies access control lists (ACLs) of files.
CALL Calls one batch program from another.
CD Displays the name of or changes the current directory.
CHCP Displays or sets the active code page number.
CHDIR Displays the name of or changes the current directory.
CHKDSK Checks a disk and displays a status report.
CHKNTFS Displays or modifies the checking of disk at boot time.
CLS Clears the screen.
CMD Starts a new instance of the Windows command interpreter.
COLOR Sets the default console foreground and background colors.
COMP Compares the contents of two files or sets of files.
COMPACT Displays or alters the compression of files on NTFS partitions.
CONVERT Converts FAT volumes to NTFS. You cannot convert the current drive.
COPY Copies one or more files to another location.
DATE Displays or sets the date.
DEL Deletes one or more files.
DIR Displays a list of files and subdirectories in a directory.
DISKPARTDisplays or configures Disk Partition properties.
DOSKEY Edits command lines, recalls Windows commands, and creates macros.
DRIVERQUERY Displays current device driver status and properties.
ECHO Displays messages, or turns command echoing on or off.
ENDLOCALEnds localization of environment changes in a batch file.
ERASE Deletes one or more files.
EXIT Quits the CMD.EXE program (command interpreter).
FC Compares two files or sets of files, and displays the differences between them.
FIND Searches for a text string in a file or files.
FINDSTR Searches for strings in files.
FOR Runs a specified command for each file in a set of files.
FORMAT Formats a disk for use with Windows.
FSUTIL Displays or configures the file system properties.
FTYPE Displays or modifies file types used in file extension associations.
GOTO Directs the Windows command interpreter to a labeled line in a batch program.
GPRESULTDisplays Group Policy information for machine or user.
GRAFTABLEnables Windows to display an extended character set in graphics mode.
HELP Provides Help information for Windows commands.
ICACLS Display, modify, backup, or restore ACLs for files and directories.
IF Performs conditional processing in batch programs.
LABEL Creates, changes, or deletes the volume label of a disk.
MD Creates a directory.
MKDIR Creates a directory.
MKLINK Creates Symbolic Links and Hard Links.
MODE Configures a system device.
MORE Displays output one screen at a time.
MOVE Moves one or more files from one directory to another directory.
OPENFILES Displays files opened by remote users for a file share.
PATH Displays or sets a search path for executable files.
PAUSE Suspends processing of a batch file and displays a message.
POPD Restores the previous value of the current directory saved by PUSHD.
PRINT Prints a text file.
PROMPT Changes the Windows command prompt.
PUSHD Saves the current directory then changes it.
RD Removes a directory.
RECOVER Recovers readable information from a bad or defective disk.
REM Records comments (remarks) in batch files or CONFIG.SYS.
REN Renames a file or files.
RENAME Renames a file or files.
REPLACE Replaces files.
RMDIR Removes a directory.
ROBOCOPYAdvanced utility to copy files and directory trees.
SET Displays, sets, or removes Windows environment variables.
SETLOCALBegins localization of environment changes in a batch file.
SC Displays or configures services (background processes).
SCHTASKSSchedules commands and programs to run on a computer.
SHIFT Shifts the position of replaceable parameters in batch files.
SHUTDOWNAllows proper local or remote shutdown of machine.
SORT Sorts input.
START Starts a separate window to run a specified program or command.
SUBST Associates a path with a drive letter.
SYSTEMINFO Displays machine specific properties and configuration.
TASKLISTDisplays all currently running tasks including services.
TASKKILLKill or stop a running process or application.
TIME Displays or sets the system time.
TITLE Sets the window title for a CMD.EXE session.
TREE Graphically displays the directory structure of a drive or path.
TYPE Displays the contents of a text file.
VER Displays the Windows version.
VERIFY Tells Windows whether to verify that your files are written correctly to a disk.
VOL Displays a disk volume label and serial number.
XCOPY Copies files and directory trees.
WMIC Displays WMI information inside interactive command shell.

명령 도움말

특정 명령에 대한 자세한 내용을 보려면 help + command-name을 입력하십시오.

예시

C:\Users\myuser>help date
Displays or sets the date.

DATE [/T | date]

Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.

If Command Extensions are enabled the DATE command supports
the /T switch which tells the command to just output the
current date, without prompting for a new date.