NavigationCLI Manual
$cd
Changer le répertoire de travail courant pour naviguer dans le système de fichiers.
Syntaxe de la commandePOSIX Standard
cd [DIRECTORY]Essayer en direct dans le bac à sable interactif
Simulation côté client sans installation avec retour instantané.
bash — terminal
AST Sandbox (Free)
Aperçu et fonctionnement
cd est la commande principale pour se déplacer entre les dossiers dans Linux.
Options et drapeaux courants
| Flag / Option | Description |
|---|---|
| ~ | Navigate directly to the current user home directory (/home/user). |
| .. | Move up one level to the parent directory. |
| - | Switch back to the previous working directory. |
| / | Navigate to the root directory of the entire filesystem. |
Exemples pratiques du monde réel
#1Navigate to the /etc configuration folder
cd /etc && pwdChanges the active directory to /etc and prints the updated path.
#2Return to user home directory
Quickly returns to /home/user from any location.
Commandes Linux associées
$lsNavigation
Lister le contenu des répertoires avec les tailles, permissions et dates.
$pwdNavigation
Afficher le chemin absolu du répertoire de travail actuel.
$mkdirOpérations sur les fichiers
Create new directories and folder hierarchies.
$whichNavigation
Locate the executable binary path of a command in system PATH.
$treeNavigation
Display directory structure in a recursive visual tree diagram.