0
0
Linux CLIscripting~10 mins

First Linux commands 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 code to list all files and folders in the current directory.

Linux CLI
ls [1]
Drag options to blanks, or click blank then click option'
A-a
B-l
C-h
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using -l shows details but not hidden files.
Using -h is for human-readable sizes, not listing all files.
2fill in blank
medium

Complete the code to change directory to the user's home folder.

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

Fix the error in the command to create a new directory named 'projects'.

Linux CLI
mkdir [1]
Drag options to blanks, or click blank then click option'
Aproject
Bproject-folder
Cproject folder
Dprojects
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'project' instead of 'projects'.
Using names with spaces without quotes causes errors.
4fill in blank
hard

Fill both blanks to display the first 5 lines of a file named 'notes.txt'.

Linux CLI
head [1] [2] notes.txt
Drag options to blanks, or click blank then click option'
A-n
B5
C10
D-c
Attempts:
3 left
💡 Hint
Common Mistakes
Using -c shows bytes, not lines.
Using 10 shows 10 lines, not 5.
5fill in blank
hard

Fill all three blanks to copy a file named 'report.txt' to a folder named 'backup' and rename it to 'report_old.txt'.

Linux CLI
cp [1] [2]/[3]
Drag options to blanks, or click blank then click option'
Areport.txt
Bbackup
Creport_old.txt
Dreports
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong folder name like 'reports'.
Swapping source and destination.