0
0
Linux CLIscripting~10 mins

cd (change directory) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to change to the home directory.

Linux CLI
cd [1]
Drag options to blanks, or click blank then click option'
A/
B..
C.
D~
Attempts:
3 left
💡 Hint
Common Mistakes
Using '..' moves up one directory, not to home.
Using '.' stays in the current directory.
2fill in blank
medium

Complete the command to move up one directory level.

Linux CLI
cd [1]
Drag options to blanks, or click blank then click option'
A/
B.
C..
D~
Attempts:
3 left
💡 Hint
Common Mistakes
Using '.' keeps you in the current directory.
Using '~' takes you to the home directory, not up one level.
3fill in blank
hard

Fix the error in the command to change to the root directory.

Linux CLI
cd [1]
Drag options to blanks, or click blank then click option'
A/
B/root
C~
D..
Attempts:
3 left
💡 Hint
Common Mistakes
Using '/root' goes to the root user's home, not the root directory.
Using '~' goes to your home directory.
4fill in blank
hard

Fill both blanks to change to the 'Documents' folder inside your home directory.

Linux CLI
cd [1]/[2]
Drag options to blanks, or click blank then click option'
A~
BDocuments
CDownloads
DDesktop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Downloads' or 'Desktop' instead of 'Documents'.
Not using the home directory symbol (~) at the start.
5fill in blank
hard

Fill all three blanks to move up two directories and then into the 'projects' folder.

Linux CLI
cd [1]/[2]/[3]
Drag options to blanks, or click blank then click option'
A..
Bprojects
Dsrc
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'src' instead of 'projects' as the target folder.
Not using '..' twice to move up two levels.