Chapter 1 - Exploring Linux Command-Line Tools Flashcards

1
Q

What shell is not often used and is often a pointer to the bash shell or other shells?

A

page 4

sh

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

What shell is based on the earlier Bourne shell for Unix but extends it in several ways, and is the common default shell for user accounts?

A

page 4

bash

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

What was the original C shell and isn’t used much in Linux?

A

page 5

csh

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

Which shell is similar to bash in many respects, but some operational details differ and no major Linux distributions make it the default shell?

A

page 5

tcsh

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

Which shell was designed to take the best features of the Bourne shell and the C shell and extend them, but has a small but dedicated following among Linux users?

A

page 5

ksh

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

Which shell takes shell evolution further than the Korn shell, incorporating features from earlier shells and adding still more?

A

page 5

zsh

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

What is the difference between “default interactive shell” and “default system shell”?

A

page5

  • default interactive shell - shell program a user uses to enter commands, run programs from the command line.
  • default system shell - is used by the Linux system to run system shell scripts, typically at startup.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which command are built-in and likely use enables you to perform some common tasks

A

page 6

Internal Commands

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

What internal command displays the text you enter

A

page 7

echo

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

To terminate the shell, which command(s) will accomplish it?

A

page 7

exit or logout

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

How does”command completion” work?

A

page 9

type part of a command or filename and then press the tab key, the shell tries to fill the rest of the command or file.

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

Which shell command keeps a record of every command you type?

A

page 10

history

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

How do you Retrieve a Command?

A

page 10
Press the Up Arrow Key, if you over shoot, press the Down Arrow Key,
Ctrl+P and Ctrl+N keystrokes double for the Up and Down Keys

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

To keep your terminal from hanging what do you do?

A

page 10

type stty -ixon

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

When you want to move within a line what different commands can you type?

A
page 10
Ctrl+A for Start of the line
Ctril+E for End of the line
Left Arrow for 1 character at a time
Right Arrow for 1 character at a time
Ctrl+B for moving Backward
Ctrl+F for moving Forward
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

If you want to launch a full-fledge editor, what keys do you press?

A

page 11

Ctrl+X followed by Ctrl+E

17
Q

What are Environment Variables?

A

page 13

They hold data to be referred to by the variable name.

18
Q

To get text-based help, what command can you use?

A

page 15
man, which is short for manual.
Using “man” followed by the particular command, you can read about that particular command from the manual.

19
Q

What are the Manual Sections?

A

page 16

  1. Executable programs and shell commands
  2. System calls provided by the kernel.
  3. Library calls provided by program libraries.
  4. Device files (usually stored in /dev)
  5. File formats.
  6. Games
  7. Miscellaneous (macro packages, conventions and so no)
  8. System administration commands
  9. Kernel routines
20
Q

How does Linux treats the input to and output from programs?

A

page 16

Streams

21
Q

Linux handles all objects files, to identify a particular file object, what file descriptors does Linux use?

A

page 17
STDIN - Standard input
STDOUT - Standard Output
STDERR - Standard Error

22
Q

What command can be used to remove every file in a directory tree that belongs to a user?

A

page 20
xargs
basic syntax is:
xargs [options] [command [initial-arguments]]

23
Q

What is the command’s short name for concatenate, and what does it do?

A

page 22
cat
links together an arbitrary number of files end to end and sends the result to standard output

24
Q

How can you merge files line by line?

A

page 24

paste command

25
Q

What command allows you break a file into pieces?

A
page 26
split
split by bytes
split by bytes in line-sized chucks
split by number of lines
26
Q

how do you delete Duplicate lines?

A

page 28

uniq

27
Q

If you want to view only the tail end of files, which command do you use?

A

page 32

Tail

28
Q

What are “regular expressions”

A

page 35
are similar in principle to the wildcards that can be used to specify multiple file names.
Two forms - basic and extended.

29
Q

What command searches for files that contain a specified string and returns the name of the file and a line of context for that string?

A

page 36

grep