Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login

Register Now

Welcome to All Test Answers

Linux – Quiz 2

  • Question 1

1 out of 1 points

Which of the following symbols is known as a tack in Linux?
Answers:
$
#
|
  • Question 2

1 out of 1 points

When you move a file to a new location, it remains in the original directory.
Answers: True
False
  • Question 3

1 out of 1 points

Multiple tasks can be automated in Linux through the use of scripts.
Answers: True
False
  • Question 4

1 out of 1 points

Which symbol represents the user’s home directory?
Answers: a.

$ (dollar sign)

b.

/ (slash)

c.

~ (tilde)

d.

! (exclamation point)

  • Question 5

1 out of 1 points

Which command is used to list file and subdirectories in the Linux directory structure?
Answers: a.

lfs

b.

ls

c.

list

d.

fs

  • Question 6

1 out of 1 points

When deleing files in Linux, a confirmation message is always displayed as a precaution.
Answers: True
False
  • Question 7

1 out of 1 points

Which of the following symbols is known as a pipe in Linux?
Answers: |
!
~
>
  • Question 8

1 out of 1 points

Which of the following symbols is known as a wakka in Linux?
Answers: > 
<
!
  • Question 9

1 out of 1 points

Which ls command option lists all files including hidden files?
Answers: a.

-F

b.

-A

c. 

-a

d.

-f

  • Question 10

 

Which command is used to remove empty directories?
Answers: a.

empty

b.

del

c.

rm

d.

rmdir

 

 

 

Chapter 2

Display the contents of the current directory  ls

Display also hidden files and hidden directories ls -a

Copy filename into directory [/path/dir_name]  cp filename [/path/dir_name]

Copy the entire dir_name into [/path/dir_name2] cp -r dir_name [/path/dir_name2]

Copy filename1 and filename2 into [/path/dir_name] cp filename1 filename2 [/path/dir_name]

Remove a file or directory called name  rm name

Remove an entire directory as well as its included files and subdirectories rm -r name

Move filename into /path/dir_name   mv filename /path/dir_name

Rename filename1 to filename2   mv filename1 filename2

Display filenames contents cat filename

Display filename in pages. Use spacebar to view next page more filename

Display filenames first 10 lines  head filename

Display filenames first 15 lines  head -15 filename

Display filenames last 10 lines tail filename

Display filenames last 15 lines tail -15 filename

Display current directory  pwd

Change to directory /path/dir_name cd /path/dir_name

Go 1 directory up  cd ..

Create directory dir_name    mkdir dir_name

Delete directory dir_name   rmdir dir_name

List the system’s hostname  hostname

Set/Display network information  ifconfig

Resolves ip’s hostname  host ip

Check if ip/hostname is reachable ping ip/hostname

Find network path to ip/hostname traceroute ip/hostname

General system information uname -a

List partition tables  fdisk -l

List filesystem disk space usage  df -T -h

List PCI devices lspci

List USB devices  lsusb

Display RAM+Swap usage  free -m

Display users currently logged in  users

Create a new user called username adduser username

Define password for user called username  passwd username

List logged-in users who

Display current user whoami

Displays info about user username  finger username

Log in as root from current login su

Log in as root from current login and take root’s path su – username

Exit from console login (ie, logout)  exit

cd

Change directory

mkdir

make directory

rmdir

remove directory

cp

copy

mv

move, rename

ls

list directory

clear

clear screen

df

show disk space

nano

basic text editing program

cd ..

go up a single directory

pwd

print working directory

hostname

my computer’s network name

mkdir

make directory

cd

change directory

ls

list directory

rmdir

remove directory

pushd

push directory

popd

pop directory

cp

copy a file or directory

mv

move a file or directory

less

page through a file

cat

print the whole file

xargs

execute arguments

find

find files

grep

find things inside files

man

read a manual page

apropos

find what man page is appropriate

env

look at your environment

echo

print some arguments

export

export/set a new environment variable

exit

exit the shell

sudo

super user

chmod

change permission modifiers

chown

change ownership

About

Leave a reply

Captcha Click on image to update the captcha .

error: Content is protected !!