# 路徑移動 Navigating in the shell 在 shell 上的「路徑」是指在 linux 跟 macOS 上以 `/` , windows 上以`\` 分開,一連串用目錄劃分的列表, A path on the shell is a delimited list of directories; separated by / on Linux and macOS and \ on Windows. 在 linux 跟 macOS ,路徑 `/` 是系統的根目錄,底下有著系統裡所有的目錄和檔案, On Linux and macOS, the path / is the “root” of the file system, under which all directories and files lie, 在 Windows 上,則是每一個磁碟都有一個根目錄(例如 C:\) whereas on Windows there is one root for each disk partition (e.g., C:\). 我們一般都預設,在課程中或是開發軟體時,你使用的是 linux 的檔案系統。 We will generally assume that you are using a Linux filesystem in this class. ## 絕對路徑 與 相對路徑 一個從根目錄 `/` 開始的路徑被稱為 **絕對路徑** ,其他的路徑則都是**相對路徑**,相對路徑會相對於目前所在的路徑。 A path that starts with / is called an absolute path. Any other path is a relative path. Relative paths are relative to the current working directory, 我們可以用 `pwd` 指令來看到目前所在的路徑,並透過 `cd` 來改變所在路徑,在路徑中 `.` 代表目前所在路徑, `..` 代表他的上層目錄。 which we can see with the `pwd` command and change with the `cd` command. In a path, . refers to the current directory, and .. to its parent directory: ## aprops ## find tyrell's command ## whereis ## url path