20250421 Flashcards

1
Q

What is a job on Linux?

A

A job is simply the shell’s unit of work. The jobs are at a higher level than Linux processes - the Linux OS knows nothing about them. They are merely constructs of the shell

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

How to ask a command to run in the background?

A

Place & after the command.

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

How to suspend the current foreground job?

A

^z
- It simply stops running, but its state is remembered.

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

How to unsuspend a jobs or bring it to the foreground?

A

fg %1

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

What does bg %2 do?

A

Make a suspended job (job No.2) run in the background
- with no argument, bg operates on the most recently suspended job.

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

What does yes command do?

A

Continiously prints y untill you kill it.

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

What is dev/null?

A

dev/null is a special file in Unix/Linux systems - often called the bit bucket or black hole - It is a special device file that discards anything written to it. If a program writes output to /dev/null, it's effectively silenced. - If you try to read from it, it gives you no data. - It ignores standard output or standard error’ of the command.

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

How to terminate a shell?

A

Type exit or press ^D

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

What is .bashrc?

A

Commands in .bashrc run every time you launch an interactive shell

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

What is .bash_logout

A

Commands in it run each time you log out.

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

If the output of a command is longer than screen, how to use less?

A

man wc | less

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