Linux Common Command Exercises

Source: Internet
Author: User

Practice One:

1. Create the following folder in the/tmp directory A_b,c_b,a_d,c_d

2. Create a root tree in the/tmp directory

Exercise two:

Create an empty directory in the/tmp/mytest directory that begins with TestDir, followed by a date and time, as testdir-2014-01-01_19:55:33)

Exercise Three:

Copy/etc All files or directories that start with P and that end in non-digits to the/tmp/mytest directory


Exercise Four:

1. Display the shell of each user on the current system

2. Displays various shells used by all users of the current system

3. Remove the 7th line of the/etc/inittab file

4. Remove the user name of the 7th user in the/etc/passwd file

5. Statistics/etc The number of files beginning with the case p


Exercise Five:

Manually add a user Tuser

Exercise VI:

1. Display the shell of each user on the current system

2. Display various shells used by all users on the current system

3. Remove the 7th line of the/etc/inittab file

4. Remove the user name of the 7th user in the/etc/passwd file

5, statistics and other directory under the size of the number of files to begin with

Practice VII:

1. Create the user Mandriva, whose ID is 2200, the base group is distro, the group ID is 3300, and the additional group is pig;

2. Create the user Gentoo, whose full name is "Gentoo", the default shell is/bin/tcsh;

3. Change the UID of the Mandriva to 4400, the basic group is Linux, the additional group is distro and Gentoo;

4. Group Gentoo add password, and set its minimum password age is 2 days, the maximum is 60 days, warning for 3 days, inactive period is 7 days.


Practice Eight:

1. Create a new user with no home directory OpenStack;

Useradd-m OpenStack

2. Copy/etc/skel to/home/openstack;

Cp-r/etc/sekl/home/openstack

3. The main reorganization of/home/openstack and its internal documents is OpenStack;

4./home/openstack and its internal files, group and other users do not have any access rights

Chmod-r go=/home/openstack


Linux Common Command Exercises

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.