Linux Commands Flashcards

1
Q

ls

A

list directory contents

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

mv

A

move and rename files

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

rm

A

remove files and directories

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

more or less

A

examines files ex. less file name

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

vi

A

a text editor

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

sudo

A

super user do, lets you become root user

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

man

A

manual

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

du

A

Disk Utilization: du
You will often need to determine where and by whom disk space is being consumed, especially when
you’re running low on it! The du command allows you to determine the disk utilization on a directoryby-
directory basis.

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

cp

A

copy

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

cat

A

Concatenate Files: cat
The cat program fills an extremely simple role: it displays files. More creative things can be done
with it, but nearly all of its usage will be in the form of simply displaying the contents of text files—
much like the type command under DOS. Because multiple filenames can be specified on the
command line, it’s possible to concatenate files into a single, large, continuous file. This is different
from tar in that the resulting file has no control information to show the boundaries of different files.

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

pwd

A

Show Present Working Directory: pwd
Inevitably, you will find yourself at the terminal or shell prompt of an already logged-in workstation
and you won’t know where you are in the file system hierarchy or directory tree. To get this
information, you need the pwd command. Its only task is to print

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

mkdir

A

create or make a directory

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

passwd

A

password

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

chown

A

Change Ownership: chown
The chown command allows you to change the ownership of a file to another user. Only the root user
can do this.

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

chgrp

A

Change Group: chgrp

The chgrp command-line utility lets you change the group settings of a file. It works much like chown.

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

chmod

A

Change Mode: chmod (change a files mode)
Directories and files within the Linux file system have permissions associated with them. By default,
permissions are set for the owner of the file, the group associated with the file, and everyone else
who can access the file (also known as owner, group, and other, respectively).
When you list files or directories, you see the permissions in the first column of the output.
Permissions are divided into four parts. The first part is represented by the first character of the
permission. Normal files have no special value and are represented with a hyphen (-) character. If the
file has a special attribute, it is represented by a letter. The two special attributes we are most
interested in here are directories (d) and symbolic links (l).
The second, third, and fourth parts of a permission are represented in three-character chunks. The
first part indicates the file owner’s permission. The second part indicates the group permission. The
last part indicates the world permission. In the context of UNIX, “world” means all users in the
system, regardless of their group settings.

17
Q

ftp

A

File Transfer Protocol

18
Q

rpm

A

Use the rpm command to list all the packages that are currently installed on your system.

19
Q

ln

A

Link Files: ln

The ln command lets you establish hard links and soft links

20
Q

find

A

Find a File: find
The find command lets you search for files using various search criteria. Like the tools we have
already discussed, find has a large number of options that you can read about in its man page. Here
is the general format of find:

21
Q

chkconfig

A

check configuration

22
Q

grep

A

grep is a powerful program used to find text patterns within files.

23
Q

umask

A

Set the default file permissions…In computing, umask is a command that determines the settings of a mask that controls how file permissions are set for newly created files.

24
Q

ps

A

Report a snapshot of current processes

List Processes: ps
The ps command lists all the processes in a system, their state, size, name, owner, CPU time, wall
clock time, and much more

25
Q

top

A

Display Tasks

Show an Interactive List of Processes: top
The top command is an interactive version of ps. Instead of giving a static view of what is going on,
top refreshes the screen with a list of processes every 2–3 seconds (user-adjustable). From this list,
you can reprioritize processes or kill them. Figure 5-1 shows a top screen.

26
Q

jobs

A

list active jobs

27
Q

bg

A

Background mount. Should the mount initially fail (for instance, if the server is down), the
mount process will send itself to background processing and continue trying to execute
until it is successful. This is useful for file systems mounted at boot time, because it keeps
the system from hanging at the mount command if the server is down.

28
Q

fg

A

To bring a job back to the foreground—that is, to give it back control of the terminal—you would
use the fg (foreground)

29
Q

kill

A

Send a Signal to a Process: kill
This program’s name is misleading: It doesn’t really kill processes. What it does is send signals to
running processes. The operating system, by default, supplies each process with a standard set of
signal handlers to deal with incoming signals.