0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【ターミナル】ターミナルについて

Last updated at Posted at 2025-03-13

記事概要

ターミナルの基本について、まとめる。

前提

  • PCはMacを使用している
  • ターミナル.appを起動している

表示内容

ターミナル.appは下記のように表示される

likapantrip@macsan ~ %

likapantrip → ユーザー名
macsan → コンピューター名
~ →カレントディクトリ
likapantrip@macsan ~ % → プロンプト
%以降 → コマンド入力部分

ディレクトリ

コンピュータ上で複数のファイルを整理するための入れ物のこと

ルートディレクトリ

階層構造の一番上にあるディレクトリのこと

カレントディレクトリ

ターミナルで、現在作業中となるディレクトリのこと

ホームディレクトリ

新規にターミナルを立ち上げた場合に作業中となるディレクトリのこと
※Macでのデフォルトのホームディレクトリは、/Users/ユーザ名

パス

絶対パス

  • ルートディレクトリから指定するパス
  • パスの一番最初に/を指定
% /Users/ユーザ名/Desktop

ホームディレクトリ/Users/ユーザ名は、~と表現することも可能

% ~/Desktop

相対パス

  • カレントディレクトリから指定するパス
  • パスの一番最初に/を指定しない
# カレントディレクトリがホームディレクトリ
% Desktop

コマンドの種類

Linuxコマンド

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?