IT/Linux

Bash 단축 키

2016. 1. 26. 11:50


CTRL-a - 커맨드라인의 맨 앞으로 이동 Moves the cursor the start of the line


CTRL-e - 커맨드라인의 맨 끝으로 이동 Moves the cursor to the end of the line CTRL-f - 앞으로 한글자 이동 Moves the cursor 1 character forward

CTRL-b - 뒤로 한글자 이동 Moves the cursor 1 character backward




제일 유용한 부분

CTRL-k - 해당 커서의 뒷부분을 잘라내기 Cuts the text under the cursor and to the end of the line.

CTRL-u - 해당 커서의 앞부분을 잘라내기 Cuts the text behind the cursor to the beginning of the line.

CTRL-w - 한 단어만큼 앞으로 잘라내기 Cuts the word behind the cursor.

CTRL-y - 잘라내기 한 것을 붙여넣기 Pastes the word or text that was cut after the cursor.

CTRL-d - 커맨드라인 삭제 Deletes the character under the cursor.





CTRL-l - 화면 지우기 (clear 명령어) Clears the screen and places the command prompt at the top of the page.

CTRL-r - history에서 명령어를 검색 Starts a search against the command history. Start by typing in what you want to search by then press CTRL-r to see the matches.


CTRL-Shift-r - history에서 명령어를 검색 (반대로)


※ xshell 에서 사용하는 경우 단축키가 겹쳐서 동작이 안되는 상황이 발생하므로 사용하려면 xshell의 단축키를 변경하는 것이 좋다.



CTRL-c - 하고 있는 작업을 중단 Kills the current running foreground program.

CTRL-z - fore/back ground 전환 Stop/sleep the current running foreground program.


CTRL-s - 화면 출력을 멈춤 Stops the output to the screen. CTRL-q - 화면 출력을 재개 Allows output to the screen.


http://wiki.spry.com/Bash_Shortcuts