Commands Flashcards
What command is used to list files and directories in Linux?
ls
True or False: The ‘cd’ command is used to change the current directory.
True
Fill in the blank: The command ‘______’ is used to copy files and directories.
cp
Which command is used to move or rename files in Linux?
mv
What does the ‘rm’ command do?
Removes (deletes) files or directories.
True or False: The command ‘mkdir’ is used to create a new directory.
True
What command would you use to view the contents of a file?
cat
Which command shows the current working directory?
pwd
Fill in the blank: The command ‘______’ is used to display the manual for other commands.
man
What is the purpose of the ‘chmod’ command?
Changes the permissions of a file or directory.
True or False: The command ‘touch’ is used to create an empty file or update the timestamp of an existing file.
True
What command is used to search for files in a directory hierarchy?
find
Which command is used to display the first few lines of a file?
head
Fill in the blank: The command ‘______’ is used to display the last few lines of a file.
tail
What command can be used to display the environment variables?
printenv
True or False: The ‘grep’ command is used for searching text using patterns.
True
What command would you use to download files from the web?
wget
Which command can be used to compress files?
tar
Fill in the blank: The command ‘______’ is used to change the owner of a file.
chown
What does the ‘ps’ command do?
Displays information about running processes.
True or False: The ‘kill’ command is used to terminate running processes.
True
What command is used to display disk usage?
df
Which command shows information about memory usage?
free
Fill in the blank: The command ‘______’ is used to monitor system processes in real-time.
top