WorksheetsLinux Commands Part A
Total questions: 28
Worksheet time: 18mins
What does the command `ssh` stand for?
Secure Socket Handler
Secure Shell
Secure Server Host
Secure System Handler
Which command would you use to list the contents of a directory in Linux?
pwd
cd
ls
touch
What is the primary use of the `touch` command in Linux?
To display the current directory
To create empty files
To change directories
To list directory contents
Which command would you use to change the current directory to its parent directory?
cd ..
cd /
cd ~
cd -
If you are in the directory `/home/user/docs` and you run the command `cd ..`, what will be your new current directory?
/home/user
/home
/home/user/docs/..
/
You want to create a new empty file named `example.txt` in your current directory. Which command would you use?
touch example.txt
echo example.txt
ls example.txt
pwd example.txt
What will be the output of the command `pwd` if you are currently in the directory `/home/user/docs`?
/home
/home/user
/home/user/docs
/docs
You need to securely connect to a remote server with the IP address `192.168.1.1` using the username `admin`. Which command would you use?
ssh admin@192.168.1.1
ssh 192.168.1.1 admin
ssh -u admin 192.168.1.1
ssh 192.168.1.1 -l admin
You have a file named `report.txt` and you want to update its modification timestamp without changing its content. Which command would you use?
touch report.txt
echo report.txt
ls -l report.txt
pwd report.txt
You are in the directory `/home/user/docs` and you want to list all files, including hidden ones, in a detailed format. Which command would you use?
ls -a
ls -l
ls -al
ls -lh
What does 'pwd' stand for?
Print Working Directory
Print Directory
Pathway Directory
Previous Working Directory
Which option is used to list files and directories in a long format in Linux?
-m
-F
-a
-l
What is the function of the Linux man command? (There are multiple correct options choose all).
Provide examples of common usage of the command.
Include a list of related commands.
Give a description of the specific Linux command’s purpose.
Provide a list of other unrelated commands.
What is the exit status of the 'pwd' command for success?
1
3
2
0
What does 'cd' stand for in Linux?
Check Disk
Change Directory
Copy Data
Create Directory
Which command is used to switch back to the previous directory where you were working earlier?
cd .
cd /
cd ..
cd -
How can you move two directories up from your current location?
cd ../
cd ../../
cd ../ ../
cd /../
What does the 'cp' command do in Linux?
Copy a file or directory
Display system date
Show disk space statistics
Create a new directory
What is the purpose of the 'cd' command in Linux?
Change directories
Copy files
Move files
Delete files
Which of the Linux command-line commands listed below
is used for directory traversal?
cd
dir
ps
dig
What does the ls command do in Linux?
Delete files
List files and directories
Modify files
Create new files
What does the 'df -h' command do in Linux?
Show disk space statistics
Copy a file or directory
Create a new directory
Display system date
what is the Linux command segment used to append data to the "s.txt" file ?
echo "Hey Ubuntu "
echo "Hey Ubuntu " > s.txt
ls >> s.txt
echo "Hello " > s.txt
is a command-line shell command used to change the current working directory in (or change from one directory to another
pwd
rm
cd
chmod
The syntax for deleting a file is (a) (b)
If you are lost and need (a) in Linux systems you must us this command (b)
I'm lost and don't know where I am, I use (a) to find where I am in the system?
What is the name of a Linux command used for renaming files and directories?
rm
ps
mv
ls
