CHAPTER 6

Getting to Know the Command Line

You may think of the command line as an archaic relic from the 1970s, with about as much relevance to computing today as a disco ball. Not so! Although Linux has numerous GUI programs, they're mostly just flashy frontends to underlying text-mode tools. By learning those tools, you'll be able to unlock Linux's true power, enabling you to get your work done more quickly. You'll also be able to manage should the Linux GUI system fail entirely, or should you need to log in and administer the system remotely. Command-line tools can also be scripted, meaning that you can write a simple program that performs a task more quickly or easily than could be done using the standard programs alone. For these reasons, most chapters of this book describe both GUI and command-line ways of getting things done.

To start with command-line operations, you must know how to start one. With that task in hand, you must know how to run programs and manipulate files. You should also be familiar with several labor-saving features of Linux command lines.

  • image Starting a command line
  • image Running programs
  • image Manipulating files
  • image Using shell features

Starting a Command Line

A Linux command line, or shell as it's more properly called, is a program like any other and must be launched in some way. Three methods are commonly used for this: starting a shell in a GUI window called a terminal, logging into the computer in a text-mode console, and logging into the computer remotely using a text-mode login protocol.

Other shells include tcsh, ksh, and zsh. Shell choice is a matter of personal preference. If you're just starting out, it's best to stick with Bash simply because it's popular.

The default shell in most Linux distributions is the Bourne-Again Shell (Bash or bash), which is based on an older shell called the Bourne Shell. Other shells are available. Most of these are similar to Bash in broad strokes, although some details differ. Each account specifies its own default shell, so individual users can change their shells if they like. (This is done with account management tools such as usermod, which is described in Chapter 14, “Creating Users and Groups.”)

Launching a Terminal

The word terminal can also apply to a tool that handles text-mode connections between computers, particularly over RS-232 serial lines and modems. This type of terminal program is uncommon today.

Most Linux distributions provide several terminal programs, although the details depend on your installation options—most desktop environments provide their own terminals, so your choices depend on the desktop environments you installed. (You can run one desktop environment's terminal program within another, if you like.) Most terminal programs include the word terminal in their names, although some don't, such as the K Desktop Environment's (KDE's) Konsole and the generic xterm.

The details of how to launch a terminal program differ from one desktop environment to another. You can normally find an entry in your desktop environment's menus, as outlined in Chapter 4, “Using Common Linux Programs.” For example, if you're using the popular GNU Network Object Model Environment (GNOME), version 3, you can find the available terminals by following this procedure:

  1. Click Activities in the top-left corner of the screen.
  2. Click the Applications heading.
  3. Select the System Tools filter near the right of the screen, which results in a display similar to the one in Figure 6.1. You should see at least one terminal program, and perhaps more than one. Figure 6.1 shows Konsole, LXTerminal, and two programs called Terminal (GNOME's Terminal and Xfce's Terminal).
  4. Select the terminal you want to use and it will launch. Figure 6.2 shows GNOME's Terminal, but you can use another terminal program if you like.

When you use the administrative account, root, the prompt normally ends in a hash mark (#). Chapter 13, “Understanding Users and Groups,” describes the root account in more detail.

The terminal program shows a prompt—[rodsmith@wembleth ˜]$ in Figure 6.2. This example shows the default Fedora prompt, which includes your user-name, your computer's hostname, your current directory (a tilde, ˜, refers to your home directory), and a dollar sign ($). Some of these features are likely to change as you use the shell, as described in subsequent sections of this chapter. If you're using another distribution, the prompt is likely to differ in details, although most default prompts end in a dollar sign ($) or a greater-than symbol (>) for ordinary user shells.

image

FIGURE 6.1 A standard Linux installation should provide at least one terminal program.

image

FIGURE 6.2 GNOME's Terminal program is typical and is dominated by a textual display area.

Most terminal programs provide common features of X programs—you can resize them, close them, select options from menus, and so on. Details depend on the program you're using, though. You may want to peruse the options available on your program's menus so you can set the font to one you like, change the color scheme, and so on.

Most terminal programs support tabs, which are similar to the tabs in a Web browser. In most cases, you can open a tab by selecting File image Open Tab in the terminal's menu. Having multiple tabs open is handy because it enables you to run multiple programs simultaneously, work easily in multiple directories, or run programs both as yourself and as root. Alternatively, you can run multiple terminal programs to achieve the same ends.

When you're done with a terminal, you can close it like other programs, by selecting File image Close Window from its menu. Alternatively, you can type exit at its shell prompt.

Logging Into a Text-Mode Console

At first glance, Linux looks like Windows or Mac OS in that it's a GUI OS. Scratch the surface, though, and you'll find a purely text-mode interface waiting. Linux supports virtual terminals (VTs), which are virtual screens that can hold different types of information—textual or graphical. Most Linux distributions run with six or seven VTs. In CentOS, Fedora, and Red Hat, the first VT typically runs the X Window System, which is Linux's GUI. In most other distributions, X runs in VT 7 or VT 8, leaving VT 1 as a text-mode display. You can switch between VTs by pressing Ctrl+Alt+Fn, where Fn is a function key. (When switching between text-mode VTs, Alt+Fn is sufficient.) Thus, to enable a text-mode console, follow these steps:

  1. Press Ctrl+Alt+F2. You'll see a text-mode prompt that reads something like this:
    Fedora release 16 (Verne)
    Kernel 3.1.0-7.fc16.x86_64 on an x86_64 (tty2)
    wembleth.rodsbooks.com login:
  2. Type your username at this prompt and it will respond with a new prompt:

    Password:

  3. Type your password here and you'll see a Bash prompt like the one shown in the window in Figure 6.2.

You can switch back and forth between your text-mode login and your X session by using Ctrl+Alt+Fn keystrokes. You can also initiate multiple text-mode logins and switch between them in the same way. This feature can be handy if you're trying to debug a problem that's related to X.

Logging out is important, especially on a public computer. It's easy to forget that you used a text-mode shell, so get into the habit of checking this detail.

When you're done with your text-mode session, type exit or logout to terminate it.

Logging In Remotely

Remote logins must be enabled by running a server program such as the Secure Shell (SSH), and you may find that you can't initiate such a connection by default. Once you've configured SSH to accept remote logins, though, you can use an SSH client program, such as ssh, to do the job:

$ ssh wembleth
rodsmith@wembleth's password:

Configuring an SSH server is beyond the scope of this book, but you can use an SSH client, as shown here, with any server that's already configured.

image Once you type your password, you'll be logged in. This example assumes you're using a Linux shell on the client computer. Note that Linux's ssh client passes your current username to the server. You can log in using another user-name by preceding its hostname with your username on the remote system and an at-sign (@), as in ssh rsmith@wembleth to log into wembleth as rsmith. SSH clients for other OSs, including Windows, are available, but their operational details differ.

Other text-mode remote-login programs, such as telnet and rlogin, exist; however, most of these are older protocols that don't employ encryption and so should be avoided. GUI remote login tools, such as Virtual Network Computing (VNC), are also available. Most of these tools also lack encryption features, although they can be tunneled through SSH to add encryption—a topic that's beyond the scope of this book.

Once you've logged in remotely, you can use the computer much as if it were local. Be sure to log out when you're finished by typing exit or logout.

Running Programs

Once you've opened a terminal or logged in using a text-mode tool, you should know how to use the shell. Bash includes a few built-in commands, but much of what you'll do in a shell involves running other programs. As described in the following sections, you can run text-mode and GUI programs. Sometimes you may want to run a program in the background and yet retain use of the shell for yourself. Another trick in running programs is redirecting input and output, which can be useful in many situations.

Running Text-Mode Programs

Linux stores programs in several locations, including /bin, /usr/bin, and /usr / local/bin. (Programs that are used mainly by root appear in /sbin, /usr/sbin, and /usr/local/sbin as well.) If an executable program appears in one of these directories (which make up the path), you can run it simply by typing its name:

$ free
               total      used    free   shared  buffers  cached
Mem:  3       798016   3759004    39012       0    24800 1117444
  -/+ buffers/cache:   2616760  1181256
Swap:      6291452           0  6291452

I denote commands you should type yourself in bold monospace font, and programs' output in standard monospace font.

This example command displays information on the computer's use of memory. You needn't be concerned with the details of this command's output, though; just note that the free program displayed information in the same terminal in which it was launched.

You can learn what directories make up the path by typing the following command:

$ echo $PATH

The result will be a colon-delimited set of directory names, which the shell searches in sequence whenever you type a command that it doesn't handle directly.

Many commands accept arguments, which are subcommands or codes that follow the program name. For instance, the cat command, whose name is short for concatenate, can quickly display a short text file on the screen:

$ cat afile.txt
This is the contents of afile.txt.

Chapter 8, “Getting Help,” describes the man page system, and other documentation, in more detail.

In this example, cat takes a filename as an argument: afile.txt. Many programs enable you to perform a wide variety of tasks depending on the precise arguments they're given. You can learn about such arguments, and other usage details, by using the Linux manual system. The program to do this is called man, and you pass it the name of the command you want to learn about as an argument, as in man cat to learn about cat.

The man command illustrates a feature of some text-mode programs: They can take over the entire terminal from which they're launched. In the case of man, you can scroll up or down in the documentation by using arrow keys, Page Up, Page Down, and so on. Text editors, such as vi, emacs, and nano, use similar features.

Running GUI Programs

You can run GUI programs from a terminal as well as text-based programs; however, this doesn't work if you logged in using a text-mode VT, and it might not work with a remote login even if you're running X locally. You must also know the filename of the program to run it. The filename is usually related to the name you use to launch the program from a desktop's menus, but it's not always identical. For instance, GNOME Terminal's filename is gnome-terminal, so that's what you'd need to type to launch another GNOME Terminal in this way.

Some GUI programs produce text-mode output that can be useful in tracking down the source of problems, so launching a program from a terminal window can be a good first step when debugging problems. You might also want to launch programs in this way because it can be quicker than tracking down programs in a desktop environment's menus, or because a program doesn't appear in the environment's menus.

Running Programs in the Background

Pressing Ctrl+Z also suspends most text-mode programs, enabling you to use the shell before returning to the program by typing fg.

When you launch a GUI program from a terminal window, the GUI program opens its own window or windows. The terminal window remains open, but will normally become unresponsive. If you want to type more commands in this window, you can do so by selecting it and pressing Ctrl+Z. This suspends the program—that is, it's sent to sleep. In its sleeping state, the GUI program won't respond to input or do any work. If you want to use both the GUI program and the terminal from which you launched it, you can type bg (short for background) in the terminal. Both programs will now be active. Typing fg returns the sleeping program to the foreground, enabling it to run but making your shell unresponsive. Note that, in this context, the terms background and foreground refer to the program's relationship to the shell, not to the position of the program's windows in a “stack” of windows on the screen.

If you know before you launch it that you want to run a program in the background, you can do so by appending an ampersand (&) to the end of the command line, as in:

$ gedit afile.txt &

This command launches the gedit GUI editor on afile.txt in the background, enabling you to edit your file and continue to use the shell. This feature is most useful for running GUI programs, but it's sometimes used with text-mode programs, too. A complex number-crunching program, for instance, might be designed to run for several minutes or hours and produce no output. You might therefore want to run it in the background and retain control of your shell. Be aware, however, that if you launch a program in the background and it produces output, that output will continue to appear in your shell, possibly intruding on whatever else you're trying to do with the shell!

Manipulating Files

Much of the work you'll do with a command line involves manipulating files. Thus, knowing the rules for handling files is extremely important. In the next few pages, I describe how to learn what files are on your hard disk, how to change between directories, how to refer to files that aren't in the current directory, and the most common commands for manipulating files.

Obtaining File Listings

image To manipulate files, it's helpful to know what they are. The ls command, whose name is short for list, provides you with this information. The ls command displays the names of files in a directory. If you pass it no options, it shows the files in the current directory; however, you can pass it both options and file or directory specifications. This command supports a huge number of options; consult its man page for details. Table 6.1 summarizes the most important ls options.

image TABLE 6.1 Common ls options

image

image

You may optionally give ls one or more file or directory names, in which case ls displays information about those files or directories, as in this example:

$ ls -p /usr /bin/ls
/bin/ls

/usr:
X11R6/ games/               include/ man/   src/
bin/   i386-glibc20-linux/  lib/     merge@ tmp@
doc/   i486-linux-libc5/    libexec/ sbin/
etc/   i586-mandrake-linux/ local/   share/

A trailing at-sign (@) denotes a symbolic link, which is a file that points to another file.

This output shows both the /bin/ls program file and the contents of the /usr directory. The latter consists mainly of subdirectories, indicated by a trailing slash (/) when -p is used. By default, ls creates a listing that's sorted by filename, as shown in this example. Note, though, that uppercase letters (as in X11R6) always appear before lowercase letters (as in bin).

One of the most common ls options is -l, which creates a listing like this:

$ ls -l t*
-rwxr-xr-x 1 rodsmith users     111 Apr 13 13:48 test
-rw-r--r-- 1 rodsmith users  176322 Dec 16 09:34 thttpd-2.20b-1.i686.rpm
-rw-r--r-- 1 rodsmith users 1838045 Apr 24 18:52 tomsrtbt-1.7.269.tar.gz
-rw-r--r-- 1 rodsmith users 3265021 Apr 22 23:46 tripwire.rpm

Chapter 15, “Setting Ownership and Permissions,” covers these topics in detail.

This output includes permission strings (such as -rwxr-xr-x), ownership (an owner of rodsmith and a group of users for all of these files), file sizes, and file creation dates in addition to the filenames. This example also illustrates the use of the * wildcard, which matches any string—thus, t* matches any filename that begins with t.

Changing Directories

image The cd command changes the current directory in which you're working. Although your current directory doesn't matter for many commands, it does matter when you begin to refer to files. As described in the next section, “Using Absolute and Relative File References,” some types of file references depend on your current directory.

When you change your current directory, your shell's prompt may change (depending on your distribution's settings), something like this:

[rodsmith@wembleth ~]$cd /usr/bin
[rodsmith@wembleth bin]$

In this book, I shorten most shell prompts to a single character, such as $, when I display commands on their own lines.

Many distributions' default configurations display only the final part of the current directory—bin rather than /usr/bin in the preceding example. If you need to know the complete path to your current location, you can use pwd:

$ pwd
/usr/bin

Linux uses a slash (/) character as a directory separator. If you're familiar with Windows, you may know that Windows uses a backslash () for this purpose. Don't confuse the two! In Linux, a backslash serves as a “quote” or “escape” character to enter otherwise hard-to-specify characters, such as spaces, as part of a filename. Also, realize that a slash isn't a legal character in a Linux filename for this reason.

Using Absolute and Relative File References

Don't confuse the root (/) directory with the /root directory, which is the root user's home directory.

As described in Chapter 5, “Managing Hardware,” Linux uses a unified directory tree, which means that all files can be located relative to a single root directory, which is often referred to using the slash (/) character. If your disk contains multiple partitions, one of these devices becomes the root filesystem, and others are mounted at some location within the overall directory tree. The same thing happens when you mount a USB flash drive, DVD, or other removable disk device. The result might resemble Figure 6.3, which shows a subset of the directories found on a typical Linux installation, along with a couple of removable media. Most commonly, removable media appear as subdirectories of the /media directory. Most subdirectories can be split off as separate partitions or even placed on separate disks. In Figure 6.3, the /home directory is on its own partition, but it's accessed in exactly the same way as it would be if it were part of the root (/) partition.

image

FIGURE 6.3 In Linux, all files are referred to relative to a single root (/) directory.

Files and directories can be referred to in three ways:

Absolute references These file references are relative to the root (/) directory, as in /home/fred/afile.txt to refer to the afile.txt file in Fred's home directory. Such references always begin with a slash (/) character.

Home directory references The tilde (˜) character refers to the user's home directory. If a filename begins with that character, it's as if the path to the user's home directory were substituted. Thus, for Fred, ˜/afile.txt is equivalent to /home/fred/afile.txt.

Relative references These file references are relative to the current directory. Thus, if Fred is working in his home directory, afile.txt refers to /home/fred/ afile.txt. Relative references can include subdirectories, as in somedir/anotherfile.txt. In Linux, every directory includes a special hidden subdirectory, .., which refers to its parent directory. Thus, if Sally is working in /home/sally, she can refer to Fred's afile.txt file as ../fred/afile.txt.

File permissions can block your access to another user's files, but that's a matter that's described in Chapter 15.

To better understand these concepts, you should try these operations:

  1. Launch a new shell, or use an existing one.
  2. Type cd ˜ to change into your home directory.
  3. Type cat /etc/fstab to view this configuration file using an absolute file reference. Its contents should appear in your terminal.
  4. Type pwd to view your current directory. It will probably be /home /yourusername, where yourusername is—you guessed it!—your username.
  5. Type cat ../../etc/fstab to view this configuration file using a relative file reference. The first .. in this command refers to /home, and the second refers to the root (/) directory. (If your home directory is in an unusual location, you may need to adjust the number of ../ elements in this command, which is why I had you use pwd to find your current directory in the previous step.)
  6. Type cat ˜/../../etc/fstab to view this configuration file using a home directory reference.

Of course, steps 5 and 6 use rather awkward file references; in real life, you'd probably use an absolute file reference to access /etc/fstab from your home directory. If you were in a subdirectory of /etc, though, typing ../fstab would be slightly easier than typing /etc/fstab; and typing ˜/afile.txt would be easier than typing the complete path to your home directory.

Using Common File Manipulation Commands

Remember man! You can use it to learn about most Linux commands and utilities, including the common file manipulation commands.

Chapter 7, “Managing Files,” describes the most common commands used to manipulate files in detail, and Chapter 15 describes commands related to file ownership and permissions. Some of these commands are used in the remainder of this chapter, so Table 6.2 summarizes them.

TABLE 6.2 Common file manipulation commands

Command effect
cat Displays files on standard output. Two or more files can be specified and output redirected to merge them together.
chgrp Changes group ownership of a file. Described in more detail in Chapter 15.
chmod Changes permissions of a file. Described in more detail in Chapter 15.
chown Changes ownership of a file. Described in more detail in Chapter 15.
cp Copies a file. Described in more detail in Chapter 7.
echo Echoes the text you enter on the screen. Although this isn't technically a file command, it can be used with redirection to create or add text to a file.
head Displays the first few lines of a text file.
less Displays a file a page at a time.
ln Creates links to files. Described in more detail in Chapter 7.
ls Displays files in a directory, as described earlier.
mkdir Creates a new directory. Described in more detail in Chapter 7.
mv Moves or renames a file. Described in more detail in Chapter 7.
pwd Prints the name of the current working directory.
rm Removes a file. Described in more detail in Chapter 7.
rmdir Removes a directory. Described in more detail in Chapter 7.
tail Displays the last few lines of a text file.
wc Counts characters, words, and lines in a text file. Described in more detail in Chapter 10.

Using Shell Features

Bash includes several features that make using it much easier. I've already described some of these. Many others are beyond the scope of this book. Two, however, deserve attention even in a brief introduction to shells: command completion and command history.

Using Command Completion

Some of the details of how command completion works vary from one distribution to another.

Command completion is the hero of everybody who hates typing: It's a way to enter a long command or filename with a minimal number of keystrokes. To use command completion, you type part of a command or filename and then press the Tab key. If only one command on the path completes the command, Bash fills in the rest—and likewise when using command completion to refer to files. To illustrate the use of command completion, you can try it out with a few commands:

  1. Launch a shell.
  2. Type if followed by pressing the Tab key. The computer will probably beep or sound a tone. This indicates that your incomplete command could be completed by multiple commands, so you must type more characters. (In some configurations, the computer skips straight to the next step, as if you'd pressed Tab twice.)
  3. Press the Tab key again. The shell displays a list of possible completions, such as if, ifconfig, and ifdown.
  4. Type co, making your command so far ifco, and press the Tab key again. The computer will probably complete the command: ifconfig. (If it doesn't, another program that completes the command may exist on your computer, so you may need to type another character or two.)
  5. Press the Enter key. The computer runs ifconfig, which displays information on your network connections.

Chapter 17, “Managing Network Connections,” describes ifconfig in more detail.

Sometimes, command completion will be able to partially complete a command. For instance, typing gru and then pressing Tab is likely to add a single unique character, b; however, several commands begin with grub, so you must then add more characters yourself. (These commands deal with the Grand Unified Bootloader, GRUB, which helps Linux to boot.)

Command completion also works with files. For instance, you can type cat /etc/ser followed by the Tab key to have Bash complete the filename, and therefore the command, as cat /etc/services. (This command shows you the contents of a Linux configuration file.)

Using Command History

Bash remembers the recent commands you've typed, and you can use this fact to save yourself some effort if you need to type a command that's similar to one you've typed recently. In its most basic form, you can use the up arrow key to enter the previous command; pressing the up arrow repeatedly moves backward through earlier and earlier commands. Table 6.3 summarizes some other commonly used keystrokes you can use in the command history—or even when editing new commands.

Many of the Bash command editing features are similar to those used by the emacs text editor.

TABLE 6.3 Bash editing and command history features

Keystroke Effect
Up arrow Retrieves the previous entry from the command history.
Left arrow Moves the cursor left one character.
Right arrow Moves the cursor right one character.
Ctrl+A Moves the cursor to the start of the line.
Ctrl+E Moves the cursor to the end of the line.
Delete key Deletes the character under the cursor.
Backspace key Deletes the character to the left of the cursor.
Ctrl+T Swaps the character under the cursor with the one to the left of the cursor.
Ctrl+X then Ctrl+E Launches a full-fledged editor on the current command line.
Ctrl+R Searches for a command. Type a few characters and the shell will locate the latest command to include those characters. You can search for the next-most-recent command to include those characters by pressing Ctrl+R again.

As an example of command history in use, try this:

  1. Type cd /tmp to change to the /tmp directory, in which many programs store temporary files.
  2. Type ls to see a list of the files in your current directory (/tmp).
  3. Press the up arrow key. Your ls command should re-appear.
  4. Press the spacebar and type in ˜ to make the new command ls ˜, and then press Enter. You should now see the contents of your home directory.
  5. Type cat /etc/fstab to see the contents of /etc/fstab, which is a file that defines how disk space is used.
  6. Press Ctrl+R. The Bash prompt will change to read (reverse-i-search)′':.
  7. Type l (without pressing Enter). Your earlier ls ˜ command will appear.
  8. Press Ctrl+R again. The command should change to a simple ls—the one you entered in step 2.
  9. Press Enter. The ls command should execute again.

The Ctrl+R search feature searches on anything you enter on a command line—a command name, a filename, or other command parameters.

Another history feature is the history command. Type history to view all the commands in your history, or add a number (as in history 10) to view the most recent specified number of commands.

I encourage you to experiment with these features. Tab completion and command history are both powerful tools that can help you avoid a great deal of repetitive typing. Command history can also be a useful memory aid—if you've forgotten the exact name of a file or command you used recently, you might be able to retrieve it by searching on part of the name you do remember.

THE ESSENTIALS AND BEYOND

Command lines are powerful tools in Linux; they're the basis on which many of the friendlier GUI tools are built, they can be accessed without the help of a GUI, and they can be scripted. To use the text-mode tools described in other chapters of this book, you should be familiar with the basics of a Linux shell. These include knowing how to start a shell, how to run programs in a shell, how to manipulate files, and how to use a shell's time-saving features.

SUGGESTED EXERCISES

  • image Read the man pages for the following commands: man, less, cat, cd, ls, grep, and su.
  • image Launch a GUI program, such as gedit, with and without a trailing ampersand (&). When you launch it without an ampersand, use Ctrl+Z to put it into the background and see how the program reacts to mouse clicks. Use fg to return it to the foreground, then repeat the process but use bg to run the program in the background. See what happens in your terminal when you exit from the GUI program.
  • image In a shell, type a single letter, such as m, and press the Tab key. What happens? What happens if you type a less common letter, such as z, and then press Tab?
  • image Experiment with the command history. Use it to search on strings that are part of both command names and filenames you've used. Use the arrow keys and editing features described in Table 6.3 to edit commands you've used previously.

REVIEW QUESTIONS

  1. What keystroke moves the cursor to the start of the line when typing a command in Bash?
    1. Ctrl+A
    2. Left arrow
    3. Ctrl+T
    4. Up arrow
    5. Ctrl+E
  2. How can you run a program in the background when launching it from a shell? (Select all that apply.)
    1. Launch the program by typing start command, where command is the command you want to run.
    2. Launch the program by typing bg command, where command is the command you want to run.
    3. Append an ampersand (&) to the end of the command line.
    4. Launch the program normally, type Ctrl+Z in the shell, and then type bg in the shell.
    5. Launch the program normally, type Ctrl+Z in the shell, and then type fg in the shell.
  3. Which of the following commands, typed at a Bash prompt, returns you to your home directory?
    1. home
    2. cd /home
    3. cd homedir
    4. homedir
    5. cd ˜
  4. True or false: The Alt+F2 keystroke, typed in X, brings up a text-mode display you can use to log into Linux.
  5. True or false: The filename ..upone.txt refers to the file upone.txt in the parent of the current directory.
  6. True or false: The -r option to ls creates a recursive directory listing.
  7. The _________ command displays the path to the current working directory.
  8. To view all files, including hidden files and directories, in the current directory, you would type ls _________.
  9. The _________ command displays text files or can concatenate multiple files together.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.249.141