quiz 1 of 20

What command is used to display the current working directory in the Linux terminal?

pwd cd mv
Which command is used to list the contents of a directory in the Linux terminal?

pwd ls top
What is the command to create a new directory?

passwd mkdir touch
How would you navigate to your home directory in the Linux terminal?

cd ~ cd . cd ..
How would you copy a file named "users.txt" from directory "~/Downloads" to directory "~/Documents" ?

cp ~/Documents ~/Downloads cp ~/Documents/users.txt ~/Downloads/users.txt cp ~/Downloads/users.txt ~/Documents/
What is the command to create a file?

touch filename mkfile filenmae both commands are correct
What is the command to display information about system and hardware

uname -a neofetch both commands are correct
What is the command to clear the terminal?

clear echo ps
What is the command to print text to terminal?

echo "text" ls "text" "text" echo
How would you display all the files in the directory "~/files" that has the extension ".txt"

ls ~/files grep ".txt" ls ~/files | grep ".txt" ls ~/files | get ".txt"
How would you run multiple commands in one line?

command1;command2;command3 command1,command2,command3 command1.command2.command3
What is the command to rewrite the file file.txt

echo "new content" >> file.txt echo "new content" < file.txt echo "new content" > file.txt
What is the command to append content to the file file.txt

echo "new content" >> file.txt echo "new content" < file.txt echo "new content" > file.txt
What is the /bin directory made for?

it is where program store temporary files it holds files called binaries and can be executed it store setting and configurations for many program
What is the /etc directory made for?

it is where program store temporary files it holds files called binaries and can be executed it store setting and configurations for many program
File permission defines ...

the size of the file who can read and/or write to the file, and is the file executable or not where the file is stored
Which one is correct?

package manager manipulate files and directories package manager edit file permission package manager install software
User and group management is

a way to manage users password a way to install, upgrade, remove packages and software a way to organize and control who can access and use the computer system
A shell is a

program that provides a command line interface for interacting with the OS graphical user interface for interacting with the OS program made for visiting the web
conditional statement in bash scripting

manage users files, directory and password execute different blocks of code based on certain conditions execute a block of code many time as long as a condition is true