すべてのユーザーが知っておくべき16のターミナルコマンド
ターミナル、またはコマンド ライン インターフェイス (CLI) は、多くの人がコンピュータ管理の聖杯とみなしています。 かつて、CLI はコンピュータ上で何かを達成する唯一の方法でしたが、その後、PC の人気が高まるにつれ、CLI はグラフィカル ユーザー インターフェイス (GUI) に取って代わられました。 私たちの中の純粋主義者は、物事を成し遂げるためにマウスを使用する代わりに、コンピュータを操作してタスクを実行させる手段として CLI を使用することを好むことがよくあります。 GUI が私たちの仕事のやり方を変えたように、多くの人々は、ノードの制御、タスクの自動化、および CLI を通してのみアクセス可能な機能の設定に、コマンドラインをまだ使用しています。 結局のところ、知れば知るほど、より良い仕事ができるようになるのです。 このことを念頭に置いて、ターミナルの機能のいくつかを紹介し、アプリの作業理解を提供するために、これらの基本的なターミナル コマンドを紹介します。
SEE: 20 Terminal shortcuts developers need to know
Change Directory
Command: cd
What it does: コマンドライン パスのディレクトリを変更します。
例: cd “path/to/directory/” (図 A)
Figure A

Listing Directory
Command: ls
What does it does: ディレクトリの内容をリストアップします。
例: ls “path/to/directory/” (図 B)
Figure B

Open files
Command: open
What does it does: ファイルを開きます。
例:open “filename” (Figure C)
Figure C

Copy a file to another directory
Command: cp
Example: cp “filename” “newfilename” (Figure D)
Figure D

Move a file
Command: mv
Example: mv “filename” “path/to/new/file/location” (Figure E)
Figure E

Renaming a file
Command: mv
Example: mv “path/to/filename” “path/to/newfilename” (Figure F)
Figure F

Create a directory
Command: mkdir
Example: mkdir “path/to/new/directory” (Figure G)
Figure G

Image: MKDIR (Figure G) Jesus Vigo/TechRepublic
Remove an empty directory
Command: rmdir
Example: rmdir “path/to/directory” (Figure H)
Figure H

Remove nested directories
Command: rm -R
例:rm -R “/path/to/root/directory” (Figure I)
Figure I

スーパーユーザー権限でコマンドを実行
Command: sudo
Example: sudo “command” (Figure J)
Figure J

List active running computer processes
Command: top
Example: top (Figure K)
Figure K

Quit sub-screen and return to Terminal
Command: q
Example: top “などのコマンドを実行し、アクティブなプロセスを表示した後、”q “を押して終了します。 (図L)
図L

Clear the Terminal screen of all previous commands
コマンドを実行します。 Clear
例:clear (Figure M)
Figure M

Get help for a command
Command: help
Example: help “command” (Figure N)
Figure N

Get one-line description for a command
Command: whatis
Example: whatis “command” (Figure O)
Figure O

Figure O
の例。 Jesus Vigo/TechRepublic
Show manual page for a command
Command: man
Example: man “command” (Figure P)
Figure P

The “exit” command
特記すべきは、ターミナル セッションを終了する “exit” コマンドです。 Jesus Vigo/TechRepublic
よく使うターミナル コマンドは何ですか
この記事は OS X を初めて使う人、あるいは Windows など他の OS から来た人に焦点を当てていますが、経験のあるユーザーも知識のベースを強化することができればと願っています。 また、このリストに追加したいターミナル コマンドはありますか? ぜひお聞かせください!
- Return of the command line (ZDNet)
- Useful command line tips for programmers and Mac managers (ZDNet)
- Galleryも参照してください。 6 回クリックします。 Windows 10 のコマンド ライン 2.0 (ZDNet)
- コマンド ライン。 何も怖がることはない (ZDNet)