0
0
Linux CLIscripting~10 mins

Building from source basics 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 configure the source before building.

Linux CLI
./configure [1]
Drag options to blanks, or click blank then click option'
A--prefix=/usr/local
B--make
C--install
D--build
Attempts:
3 left
💡 Hint
Common Mistakes
Using --make or --install with configure causes errors because these are not configure options.
Omitting --prefix may install software in default locations, which might require root permissions.
2fill in blank
medium

Complete the command to compile the source code using make.

Linux CLI
make [1]
Drag options to blanks, or click blank then click option'
Ainstall
B-j4
Cclean
Dconfigure
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' with make compiles and installs, but here we want to speed up compilation only.
Using 'configure' with make is invalid; configure is a separate script.
3fill in blank
hard

Fix the error in the command to clean build files.

Linux CLI
make [1]
Drag options to blanks, or click blank then click option'
Adelete
Bremove
Cclear
Dclean
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'remove', 'delete', or 'clear' are not standard make targets and cause errors.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps words to their lengths only if length is greater than 3.

Linux CLI
{word: [1] for word in words if [2]
Drag options to blanks, or click blank then click option'
Alen(word)
Blen(word) > 3
Cword.startswith('a')
Dword.upper()
Attempts:
3 left
💡 Hint
Common Mistakes
Using word.startswith('a') filters words starting with 'a', not length.
Using word.upper() as value does not give length.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps uppercase keys to values only if value is positive.

Linux CLI
{ [1]: [2] for k, v in data.items() if [3] }
Drag options to blanks, or click blank then click option'
Ak.upper()
Bv
Cv > 0
Dk.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using k.lower() changes keys to lowercase, not uppercase.
Filtering with v < 0 would keep negative values, not positive.