operating system deck 4- Linux commands Flashcards

1
Q

You need to view the processes running on a Linux system. Which command should you use?

A

The ps command provides a list of current processes running on the system.

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

grep

A

allows you to search for a pattern of text within one or more files. For example, you could find the characters “pwd” in file1.txt, file2.txt and file3.txt by entering the grep pwd file1.txt file2.txt file3.txt command.

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

apt-get command

A

allows you to manage packages within Ubuntu.

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

chmod command

A

allows you to change permissions on a file. The basic syntax is chmod user=Permission List filename. The user parameter can be u for you, g for the group, or o for other. The permission list parameters include r for read, w for write, x for execute, and - for no access. For example, the chmod u=rwx,g=r-x, o=r– myspecialfile command would give the user read, write and execute access, the group read and execute access, and others read access only.

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

apt-get

A

allows you to work with the Advanced Packaging Tool and install packages (applications) in Ubuntu, which is a Debian-based distribution.

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

cat

A

displays the contents of one or more files without having to open the file for editing.

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

cd

A

changes directory. It is similar to the Windows cd command. For example, the cd / moves you to the root directory, and cd.. moves you to the parent directory.

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

chmod

A

changes the permissions on a file. The basic syntax is chmod user=PermissionList filename. The user parameter can be u for you, g for the group, or o for other. The permission list parameters include r for read, w for write, x for execute, and – for no access. For example, the chmod u=rwx,g=r-x, o=r– myspecialfile command would give the user read, write and execute access, the group read and execute access, and other users read access only.

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

chown

A

changes the ownership of the file. For example, the chown mrhacker mypassword.txt command would give the mrhacker user ownership of the mypassword.txt file.

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

cp

A

copies files and directories.

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

dd

A

allows you to copy a file and convert it to another format during the copying process.

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

df

A

gets a full summary of available and used disk space of the file system.

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

dig

A

queries the Domain Name System for troubleshooting purposes as well as will display the DNS information.
find –locates files based on the user-specified criteria and either prints the pathname for the matched object or can perform actions on the matched object depending on the parameters the user put into place.

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

grep

A

finds a pattern of text within a file or group of files. For example, you could find the characters “pwd” in file1.txt, file2.txt and file3.txt by entering the grep pwd file1.txt file2.txt file3.txt command. iwconfig / ifconfig – analogous to the ipconfig command. The ifconfig command is used to view and configure network interfaces. The iwconfig command is similar to the ifconfig command, but is restricted to wireless interfaces.

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

ls

A

lists file and directory contents.

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

IP

A

shows or manipulates routing, devices, and tunnels that are connected to a device.

17
Q

man

A

displays the user manual of any command that the user can run on the terminal. It provides a detailed view of the command manual displaying the name, synopsis, description, files, errors, versions, and other similar information.

18
Q

mv

A

renames or moves a file.

19
Q

nano

A

a small, free editor that replaces the default editor, Pico. Nano improves upon pico by implementing features like “search and replace” and “go to line number.”

20
Q

ps

A

provides a list of current processes running on the system.

21
Q

pwd vs. passwd

A

The pwd command displays the working directory, or the directory that you are currently in. On the other hand, the passwd command allows you to change the password of a user account.

22
Q

q

A

quits (exits) the vi editor. By itself, the q command will allow you to exit the editor if no changes have been made to the file. If you have made changes to the file and wish to keep the changes, enter wq. If you wish to discard the changes, enter q!.

23
Q

top

A

displays information about the CPU and memory utilization.

24
Q

rm

A

removes a file.

25
Q

shutdown

A

turns off the computer. Adding the /h parameter to the command halts the shutdown and adding the /r parameter to the command reboots after shutdown.

26
Q

su/sudo

A

The su command allows you to log on as the superuser (root). The sudo command allows a regular user to execute commands as the superuser.

27
Q

vi

A

the text editor in Linux. To edit a file, enter the vi filename command.

28
Q

yum

A

An interactive package manager that can automatically perform system updates, perform dependency analysis, remove old packages, and perform queries.

29
Q
A