|
|
LUX 263 - Linux System Administration III
Lesson 2: Chapter 11, Files, Directories, and File Systems, part 2
Objectives:
This lesson continues the discussion of concepts from chapter 11.
Objectives important to this lesson:
- Important directories
- Startup files
- Network configuration files
- Login configuration files
- Device files
- Seven file types
- File system types
Concepts:
Chapter 11, part 2
We will close chapter 11 with three labs that cover material about the
file system. The first one should be a review for most of you. It covers
several file and directory related commands:
- cd and pwd - The change directory and present working
directory command are used to navigate the file system and to verify
that we are where we think we are when needed.
- mkdir - The make directory command is used to create a new
directory, either as a child of our current directory or anywhere else
in the file system.
- vim - vim is only one of several text editing programs that
may be in your version of Linux. When you are instructed to use a text
editor for this class, you can use any of the available editors, unless
the lesson is really about one in particular. I would advise using the
LibreOffice word processor when possible, but make sure it saves your
work as a text file.
- rmdir - The remove directory command does what it sounds like
it would do. However, remember that is only works on empty directories.
When you have to remove nested directories that may have files in them,
use rm -r command on the target directory.
The second lab is about using an ID without elevated rights, but accessing
root premissions when needed:
- The who am i command does not seem to be functional in Fedora
24, but whoami does work. Use su -c with each one as the
lab states.
- Preceding each command you normally issue with su -c may not
do anything but ask you for the password for root. The outcomes will
be different when you ask the system to do something only an administrator
can do.
- The useradd command is another command restricted to administrators.
You should verify that your usual login ID does not have this right.
- You can follow the lab instructions to reset passwords for the users
as needed, but set the password for student back to the password you
used when you logged in before you end the lab.
- Use the groupadd and usermod commands to add a group
to the system and assign the new users to it.
- Note the procedure to start a new shell as one of the new users, and
that it requires you to know that user's password, which we normally
would not know. su - max is the command (max is the user ID).
Note the spaces before and after the dash.
The third lab reviews several file related commands:
- touch - to create an empty file
- ls - to see file listings and to see properties
of files
- cat - to view the contents of a file (also more
and less)
In the third lab, there are several questions that the lab does not provide
answers for. Research these questions in the text, and on the Internet
as needed. Ignore step 7, but carry out step 8 and the steps that follow
it.
|