NEW
Font size
WorksheetsMastering Basic Linux Commands
Total questions: 15
Worksheet time: 8mins
Which command is used to list all files and directories in the current directory in Linux?
ls
list
dir
show
What command would you use to change the current working directory to `/home/student`?
cd /home/student
chdir /home/student
move /home/student
goto /home/student
Which command displays the contents of a text file named `notes.txt`?
show notes.txt
cat notes.txt
open notes.txt
read notes.txt
How do you create a new empty file called `report.txt`?
make report.txt
touch report.txt
newfile report.txt
create report.txt
Which command is used to remove a file named `oldfile.txt`?
del oldfile.txt
erase oldfile.txt
rm oldfile.txt
removefile oldfile.txt
What is the command to display the current working directory?
pwd
cwd
whereami
dir
Which command is used to copy a file named `data.csv` to a directory called `backup`?
cp data.csv backup/
copy data.csv backup/
mv data.csv backup/
duplicate data.csv backup/
How do you move a file called `draft.docx` to the directory `Documents`?
move draft.docx Documents/
mv draft.docx Documents/
cp draft.docx Documents/
transfer draft.docx Documents/
Which command is used to display the first 10 lines of a file named `log.txt`?
head log.txt
top log.txt
start log.txt
first log.txt
What command would you use to see a list of all running processes?
ps
jobs
listproc
showproc
Which command is used to search for the word "Australia" in a file called `countries.txt`?
find "Australia" countries.txt
search "Australia" countries.txt
grep "Australia" countries.txt
lookfor "Australia" countries.txt
How do you display the manual page for the `ls` command?
help ls
man ls
info ls
manual ls
Which command is used to display the amount of free and used memory in the system?
meminfo
free
memory
ram
What command would you use to shut down the system immediately?
shutdown now
poweroff
halt
all of the above
Which command is used to display the current date and time?
date
time
datetime
now
