Linux Related

1 minute read

Author: Doe Hoon LEE

Linux Dictionary

리눅스 사전

A_

  • Alias

Temporary Alias

$ alias shortCutName="Your Command Here"

$ alias myproject="cd Documents/Projects/Personal"

$ alias sshssh="cd etc/var/etc && ssh -i"

Note

-Temporary aliases are available only in the current terminal.

-They will no longer be available once the current termianl closes.

Permanent Alias Add alias in bashrc (~/.bashrc)

ex. [$ nano /etc/bashrc]

C_

  • Curl

-show header/document information : [curl -I URL]

-show including protocol response headers : [curl -i URL]

  • chmod

-change the access permission

ex.

[$ chmod 755 sample.txt] [$ chmod u=rwx, go=rx sample.txt]

D_

H_

  • Head

-show the first 10 (default unless specified) lines of a file

[$ head filename]

-show the first 5 lines of a file

[$ head -n 5 filename]

  • History

-show history of commands $ history

-show the last 5 commands used $ history 5

-show the last 10 commands $ history | tail


N_

  • Nano

(1) save and quit

[ctrl + x] will ask if you would like to save before exiting.

(2) previous/next page

-previous page : [ctrl + y]

-next page : [ctrl + v]

Key Combination What It Does
ctrl + s save current file
ctrl + x save and exit
ctrl + y previous page
ctrl + v next page

P_

  • PWD

: print full pathname of the current working directory

[$pwd]

Tags:

Categories:

Updated:

Leave a comment