Font size
WorksheetsLinux - Week 3
Total questions: 16
Worksheet time: 8mins
What are the process states in Linux?
Ready: The process is created and is ready to run
Running: The process is being executed
Blocked or wait: Process is waiting for input from the user
Zombie: Process terminated, but the information still exists in the process table
Which affirmation is TRUE:
Is: This command list out all the files in the directed folder
cd: This command is used to change to the directory you want to work from the present directory
mkdir: This command is used to create an entirely new directory
rmdir: This command is used to remove a directory from the system
Check correct linux networking and troubleshooting commands:
Hostname
Ping
Netstat
Code
Which are user-based permission groups in Linux?
All Users
Group
Admin
Owner
What is the tail command in Linux?
Print the last N number of lines of the given data, it prints 10 lines by default
Print the first N number of lines of the given data, it prints 10 lines by default
Print only the last N number of lines of the given data
Print only the first N number of lines of the given data
Enlist some Linux to file content commands?
head: Display top lines of the file
tail: Display the last lines of the file
cat: Concatenate more than 2 files
more: Displays the content in pager form to view in the terminal
Which Linux command is used to list all running processes:
Hostname
Echo
Ps
Man
How to uninstall the libraries in Linux?
apt search (program name)
apt purge (program name)
apt upgrade (program name)
apt remove (program name)
What is cat > filename.txt command doing?
copy files or directories and their content
find a file in the database system
creates a new file
find files in the current directory
chmod -wx filename is used to:
to add write and executable permissions
to take out executable permissions
to take out write and executable permissions
to add write permissions
rm command is used to: - all correct
is used to delete files within a directory
the user performing this command should have write permissions
you can remove multiple files
removes the file(s) and you can’t undo it
grep command is used for:
lets you find a word by searching through all the texts in a specific file
report the system’s disk space usage
can find a file in the database system
search for files within a specific directory
Command to install a package:
sudo install package_name
sudo grep install package_name
grep install package_name
sudo apt install package_name
The d in ‘drw-rw-r–‘ means:
implies that we have selected a directory
implies that we have selected a file
implies that we have permissions to execute the file
implies that the permissions are for admin user
cp command:
displays content in reverse order
renames files in Linux
copy files or directories and their content
moves files and directories from one directory to another
chmod -R 777 filename is used to:
to remove rwxrwxrwx permissions from the file
to add rwxrwxrwx permissions to the file
to add rwx permissions
to remove rwx permissions
