Наши партнеры

Книги по Linux (с отзывами читателей)

Библиотека сайта rus-linux.net

3.6. Exercises

Just login with your common user ID.

3.6.1. Partitions

  • On which partition is your home directory?

  • How many partitions are on your system?

  • What is the total size of your Linux installation?

3.6.2. Paths

  • Display your search path.

  • Export a senseless path by entering, for instance, export PATH=blah and try listing directory content.

  • What is the path to your home directory? How would another user reach your home directory starting from his own home directory, using a relative path?

  • Go to the tmp directory in /var.

  • Now go to share in /usr using only one command. Change to doc. What is your present working directory?

3.6.3. Tour of the system

  • Change to the /proc directory.

  • What CPU(s) is the system running on?

  • How much RAM does it currently use?

  • How much swap space do you have?

  • What drivers are loaded?

  • How many hours has the system been running?

  • Which filesystems are known by your system?

  • Change to /etc/rc.d | /etc/init.d | /etc/runlevels and choose the directory appropriate for your run level.

  • What services should be running in this level?

  • Which services run in graphical mode that don't run in text mode?

  • Change to /etc

  • How long does the system keep the log file in which user logins are monitored?

  • Which release are you running?

  • Are there any issues or messages of the day?

  • How many users are defined on your system? Don't count them, let the computer do it for you!

  • How many groups?

  • Where is the time zone information kept?

  • Are the HOWTOs installed on your system?

  • Change to /usr/share/doc.

  • Name three programs that come with the GNU coreutils package.

  • Which version of bash is installed on this system?

3.6.4. Manipulating files

  • Create a new directory in your home directory.

  • Can you move this directory to the same level as your home directory?

  • Copy all XPM files from /usr/share/pixmaps to the new directory. What does XPM mean?

  • List the files in reverse alphabetical order.

  • Change to your home directory. Create a new directory and copy all the files of the /etc directory into it. Make sure that you also copy the files and directories which are in the subdirectories of /etc! (recursive copy)

  • Change into the new directory and make a directory for files starting with an upper case character and one for files starting with a lower case character. Move all the files to the appropriate directories. Use as few commands as possible.

  • Remove the remaining files.

  • Delete the directory and its entire content using a single command.

  • Use grep to find out which script starts the Font Server in the graphical run level.

  • Where is the sendmail server program?

  • Make a symbolic link in your home directory to /var/tmp. Check that it really works.

  • Make another symbolic link in your home directory to this link. Check that it works. Remove the first link and list directory content. What happened to the second link?

3.6.5. File permissions

  • Can you change file permissions on /home?

  • What is your standard file creation mode?

  • Change ownership of /etc to your own user and group.

  • Change file permissions of ~/.bashrc so that only you and your primary group can read it.

  • Issue the command locate root. Do you notice anything special?

  • Make a symbolic link to /root. Can it be used?