0Pricing
Linux Command Line Mastery · レッスン

基本操作:`cd`、`ls`、`pwd`

ファイルシステム内を移動し、ディレクトリの内容を一覧表示して、現在の場所を確認する方法を学びます。

「基本操作:`cd`、`ls`、`pwd`」はCoddyKit上の無料Linux Command Line Masteryレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはLinux Command Line Mastery学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Linux Command Line Masteryコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

Navigating Your Linux System

The Linux file system is a tree rooted at /. This lesson covers the commands to move around it and see what’s inside each directory.

Where Am I? The `pwd` Command

Lost your place? pwd (print working directory) shows the full path of where you are right now — your “you are here” sign.

See Your Current Path with `pwd`

Run pwd to see your current directory — likely something like /home/user.

pwd

What's Here? The `ls` Command

ls (list) shows the files and folders in your current directory — or any directory you point it at.

Listing Directory Contents with `ls`

Let’s make a folder and a file, then run ls to watch them show up.

mkdir my_documents
touch notes.txt
ls

Moving Around: The `cd` Command

cd (change directory) moves you around the file system. Give it an absolute path (from /) or a relative one (from where you are).

Changing with Absolute Paths

An absolute path starts at the root /, so it always points to the same place no matter where you currently are.

mkdir -p /tmp/my_project/src
cd /tmp/my_project/src
pwd

Changing with Relative Paths

A relative path starts from your current spot — shorter and handy. Use . for here and .. for the parent directory.

mkdir -p project/images
cd project
pwd
cd images
pwd
cd ..
pwd

Useful `ls` Options: `-l` and `-a`

Two essential ls flags: -l for a long listing (permissions, size, date) and -a to reveal hidden dotfiles.

touch .config_file
touch public_file
ls -a
ls -l

Test Your Navigation Skills

Consider the following sequence of commands executed in a terminal:

mkdir my_app
cd my_app
mkdir assets
touch assets/image.png
cd ..
ls

Recap: Navigate Like a Pro!

Navigation locked in! pwd shows where you are, ls lists contents, and cd moves you around with absolute or relative paths.

よくある質問

「基本操作:`cd`、`ls`、`pwd`」レッスンは無料ですか?

はい。「基本操作:`cd`、`ls`、`pwd`」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Linux Command Line Masteryコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Linux Command Line Masteryコースには全4レッスンが含まれています。

「基本操作:`cd`、`ls`、`pwd`」で何を学びますか?

ファイルシステム内を移動し、ディレクトリの内容を一覧表示して、現在の場所を確認する方法を学びます。 ブラウザで直接実行するハンズオンコードでLinux Command Line Masteryを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Linux Command Line Masteryを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのLinux Command Line Masteryは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「基本操作:`cd`、`ls`、`pwd`」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このLinux Command Line Masteryレッスンでコードを書いて実行できますか?

はい。すべてのLinux Command Line Masteryレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. Linuxシェル入門
  2. 基本操作:`cd`、`ls`、`pwd`
  3. ファイルとディレクトリの管理:`mkdir`、`rm`、`cp`、`mv`
  4. ヘルプを探す:man、--help、tldr
← Linux Command Line Masteryに戻る