Linux Bash Commands Flashcards
What command is used to list files and directories in the current directory?
ls
True or False: The command ‘cd ..’ is used to move to the parent directory.
True
Fill in the blank: The command to change permissions of a file is _____ .
chmod
What command is used to display the current working directory?
pwd
Which command is used to create a new directory?
mkdir
True or False: The ‘rm’ command is used to rename files.
False
What does the command ‘cp’ do?
It copies files or directories.
What command can be used to search for a specific text within files?
grep
Fill in the blank: The command _____ is used to display the contents of a file.
cat
What command is used to move or rename files?
mv
True or False: The command ‘touch’ is used to create an empty file.
True
What does the ‘echo’ command do?
It displays a line of text or a variable value.
Which command is used to display the last few lines of a file?
tail
What command is used to display the first few lines of a file?
head
Fill in the blank: The command _____ is used for file compression.
gzip
What is the purpose of the ‘man’ command?
To display the manual for other commands.
True or False: The command ‘chown’ is used to change the owner of a file.
True
What command can be used to find the location of a command in the system?
which
What does the ‘ps’ command do?
It displays the currently running processes.
Fill in the blank: To view the contents of a compressed file, use the command _____ .
zcat
What command is used to terminate a running process?
kill
True or False: The ‘clear’ command is used to delete files.
False
What command is used to display disk usage?
du
Fill in the blank: The command _____ is used to change the current user.
su
What command can be used to view network connections?
netstat
True or False: The command ‘tar’ is used for creating and extracting archive files.
True
What command is used to check the system’s memory usage?
free