Unit 4 - Linux Flashcards

1
Q

Examples of pen testing tools.

A

Packet generators, port scanners, and proof-of-concept exploits are examples of PenTesting tools.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some popular terminal emulators in Linux?

A

In Linux, popular terminal emulators are Terminator, eterm, xterm, konsole, and gnome-terminal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the following linux commands.

mv
chmod
chown

A

mv

Moves or renames files and directories

chmod

Modifies file permissions

chown

Changes the ownership of a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe the following linux commands.

dd
pwd
ps

A

dd

Copies data from an input to an output

pwd

Displays the name of the current directory

ps

Lists the processes that are currently running in the system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe the following linux commands.

su
sudo
grep

A

su

Simulates a login as another user or to become a superuser

sudo

Runs a command as a super user, by default, or another named user

grep

Used to search for specific strings of characters within a file or other command outputs. To search through the output of a previous command, grep must be piped at the end of the previous command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe the following linux commands.

ifconfig
apt-get
iwconfig

A

ifconfig

Used to display or configure network card related information. If issued without parameters, ifconfig will display the current network card(s) configuration. Note: While still widely in use, this command is deprecated. Use ip address instead.

apt-get

Used to install, configure and remove packages on Debian and its derivatives. Note: apt-get is a user-friendly command line front-end for dpkg, Debian’s package manager. The combo dpkg and apt-get is the default package manager system in all Debian Linux derivatives, including Raspbian.

iwconfig

Used to display or configure wireless network card related information. Similar to ifconfig, iwconfig will display wireless information when issued without parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe the following linux commands.

shutdown
passwd
cat
man

A

shutdown

Shuts down the system, shutdown can be instructed to perform a number of shut down related tasks, including restart, halt, put to sleep or kick out all currently connected users.

passwd

Used to change the password. If no parameters are provided, passwd changes the password for the current user.

cat

Used to list the contents of a file and expects the file name as the parameter. The cat command is usually used on text files.

man

Used to display the documentation for a specific command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the following linux commands.

ls
cd
mkdir

A

Is

Displays the files inside a directory

cd

Changes the current directory

mkdir

Creates a directory under the current directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe the following linux commands.

cp
mv
rm

A

cp

Copies files from source to destination

mv

Moves files to a different directory

rm

Removes files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the following linux commands.

grep
cat

A

grep

Searches for specific strings of characters within a file or other commands outputs

cat

Lists the contents of a file and expects the file name as the parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is a benefit of command line-based text editors over graphical text editors?

A

While graphical text editors are convenient and easy to use, command line-based text editors are very important for Linux users. The main benefit of command-line-based text editors is that they allow for text file editing from a remote computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the & and # at the end of a prompt symbolize?

A

Note: $ (dollar sign) indicates regular user privilege. If a ‘#’ (hashtag or pound sign) is displayed at the
prompt, it indicates elevated privilege (root user).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are absolute and relative paths?

A

Absolute path is the term used when referring
to paths that always start at the root (/) directory. It is also possible to work with relative paths. Relative
paths reduce the amount of text to be typed. To understand relative paths, we must understand the . and.. (dot and double dot) directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the - a option tell ls to show in the command ls -la /home/analyst/cyops_folder3

A

The -a option tells ls to show all files. Notice the . and .. listings shown by ls. These listings are used by
the operating system to track the current directory (.) and the parent directory (..) You can see the use of
the . and .. when using the cd command to change directories. Using the cd command to change the
directory to the . directory incurs no visible directory change as the . points to the current directory itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What directory does the / represent?

A

/ – The Root
Everything begins in your system from this directory. All your folders, hard drives, USB drivers, everything is located in this root folder. You cannot go above this directory.

Also, the root directory is designated by the slash sign.

The concept of the root directory may be difficult to understand for Windows users who are used to see something like disk C, disk D and disk E. In Linux, every disk is a represented as a folder that is mounted under this root directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does the /bin folder contain?

A

/bin – Binaries
The /bin folder contains programs that are essential for the system to boot and run. So, if you destroy this folder, your system won’t boot and run.

These programs are stored in the binary format. In other words, they are not in text format. You cannot open and read the content of these programs. The advantage of such format is that a computer can read and execute these programs very fast.

17
Q

What does the /boot folder contain?

A

/boot – Boot Files
It is easy to guess from the name. This folder is needed to boot your system. It contains the Linux kernel, initial RAM disk image for drives need at boot time, and the bootloader.

I also would like to point out that within this boot folder, you can find the grub folder that contains grub configuration files.

18
Q

What does the /dev folder contain?

A

/dev – Device Nodes
Here, I need to introduce another important concept of Linux – everything is a file. The /dev folder contains files for all devices your Linux is able to recognize.

If you have some Linux experience, you may recall that when you mount a hard drive, you use a name such as /dev/sda1. The sda is the name of a first hard drive recognized by your Linux kernel and it is located in the dev folder. When the disk is mounted, you see it as a folder in that mounting point.

You can also find here USB devices, CPU etc.

19
Q

What does the /etc folder contain?

A

/etc – Configuration Files
The /etc folder comprises all system-wide configuration files and some shell scripts that are executed during the system boot. All files here are text files, so they are human readable.

If you ever did any system-wide configuration, you probably edited some files here.

For example, there is /etc/fstab file that contains a table of storage devices and their mounting points.

20
Q

What does the /home folder contain?

A

/home – Users’ Folder
The home directory contains a home folder for each regular user on your Linux system. For example, I have tow folders in my /home folder. ALU is my home folder. The second folder belongs to another user, whom I named User2. So, the home folder of every user is named by its username.

You have as many folders as many users you have on your system.

These users’ folders are where users store their private data such as documents, videos, picture, music etc. When you open your file manager or your terminal by default you are located in you user’s home folder. It is also often marked as ~/.

21
Q

What does the /lib folder contain?

A

/lib – Libraries
You already know the /bin directory that contains programs, this /lin folder contains libraries required by those programs from the /bin folder.

A library is a set of functions that are shared between programs. Thus, this /lib folder is also essential for your system to work correctly.

22
Q

What does the /lost+found folder contain?

A

/lost+found – Recovered Files
You will have this directory if you use the ext4 file system. Most of the modern Linux distros use ext4, so most likely you have this folder. This is a file system specific folder that is used for data recovery in case of file corruption. Unless something bad has happened, this folder should be empty on your system.

This /lost+found folder is produced on every separate partition. So, if your /home folder is on a separate partition, you should have this /lost+found folder in your home directory too.

23
Q

What does the /media folder contain?

A

/media – Automatic mount point
This folder is used for automatic mounting of removable media such as USB drives, CD-ROM etc. For example, if your system is configured for automatic mounting, when you insert a USB drive it will be mounted to this folder.

24
Q

What does the /mnt folder contain?

A

/mnt – Manual mount point
The /mnt folder is similar to the /media folder, it is also used to mount devices, but usually, it is used for manual mounting. You, of course, can manually mount your devices to /media, but to keep some order in your system it is better to separate these two mounting points.

25
Q

What does the /opt folder contain?

A

/opt – Optional Software
This folder is not essential for your system to work. Usually, it is used to install commercial programs on your system. For example, my Dropbox installation is located in this folder.

26
Q

What does the /proc folder contain?

A

/proc – Kernel Files
This is a virtual file-system maintained by the Linux kernel. Usually, you do not touch anything in this folder. It is needed only for the kernel to run different processes.

27
Q

What does the redirect > command do?

A

Another powerful command line operator in Linux is known as redirect. Represented by the > symbol, this
operator allows the output of a command to be redirected to some location other the current terminal window
(the default).

28
Q

What command would you use to view the contents of the file called some_text.txt?

A

cat some_text.txt

29
Q

What does the&raquo_space; operator accomplish?

A

Similar to the > operator, the&raquo_space; operator also allows for redirecting data to files. The difference is that&raquo_space;
appends data to the end of the referred file, keeping the current contents intact.

30
Q

Why do some Linux files begin with a “.”?

A

In Linux, files with names that begin with a ‘.’ (single dot) are not shown by default. While dot-files have
nothing else special about them, they are called hidden files because of this feature. Examples of hidden
files are .file5, .file6, .file7.

31
Q

How do you list hidden files in Linux?

A

ls -la

32
Q

What is the function of the cp operation.

A

The cp command is used to copy files around the local file system. When using cp, a new copy of the file
is created and placed in the specified location, leaving the original file intact. The first parameter is the
source file and the second is the destination. I

33
Q

How do you move files in linux?

A

Moving files works similarly to copying files. The difference is that moving a file removes it from its original
location. Use the mv commands to move files around the local filesystem. Like the cp commands, the mv
command also requires source and destination parameters.