0
0
Linux CLIscripting~10 mins

Aliases for shortcuts 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 create an alias named ll that lists files in long format.

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

Complete the alias to clear the terminal screen using the clear command.

Linux CLI
alias cls='[1]'
Drag options to blanks, or click blank then click option'
Aclear
Breset
Ccls
Dclean
Attempts:
3 left
💡 Hint
Common Mistakes
Using cls works in Windows but not in Linux.
Using reset clears and resets terminal but is different.
3fill in blank
hard

Fix the error in the alias that should show disk usage in human-readable form.

Linux CLI
alias disk='du -[1]h'
Drag options to blanks, or click blank then click option'
As
Bh
Ca
Dc
Attempts:
3 left
💡 Hint
Common Mistakes
Using -s summarizes but does not format sizes.
Using -c adds totals but no human-readable sizes.
4fill in blank
hard

Fill both blanks to create an alias gs that runs git status.

Linux CLI
alias gs='git [1] [2]'
Drag options to blanks, or click blank then click option'
Astatus
Bcommit
C-s
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using commit runs a different command.
Using -v shows verbose output, not short status.
5fill in blank
hard

Fill all three blanks to create an alias llh that lists files long format with human-readable sizes and shows hidden files.

Linux CLI
alias llh='ls [1] [2] [3]'
Drag options to blanks, or click blank then click option'
A-l
B-a
C-h
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting -a hides hidden files.
Using -r reverses order but is not needed here.