Linux System user Network Disk command

Source: Internet
Author: User
Tags clear screen traceroute command

We learned more about the view find help command in the previous section, find the Class command in the Which,find is what we must grasp, see the Class command cat,head,tail is what I must master, as for the help command we know the simple use of aid, there are children shoes may be puzzled, More famous book Bird Brother said a lot of commands need to master, how do I say that these few? Yes, right! On these, this is to want everyone to get started as soon as possible in the shortest time to learn and then work, command just started to learn too much, will let you give up the idea. So I write the time appropriate to give up some of the most important explanation. There's nothing more to say, and then we start the order.

Today I will explain to you system Information Class command, user class, disk class, network Class command

System Information Class

System Information Command so the name of the idea is to view the system information, such a lot of commands, here I also summed up some of the use of a relatively high frequency to explain

When we log in to the system and want to know the name of the computer, the hostname command jumps out and looks at the following

There are children's shoes said I want to see the kernel information, then we use the following command

Can see when I enter uname–r he tells me that the kernel version number is 2.6.32. When using-m he told me how many bits of the system. Using the previous Cat command tells us that the system version number is 6.6.

When it comes to kids ' shoes, I don't know how to shut down and restart the server. This is more simple to restart with the Reboot command, and then shut down with the halt command Of course the odds of these commands are very small, but we must know because he is involved in the system. These commands are single command, do not need to follow any parameters, direct carriage. I'm not doing a demo here.

Next we tell you a command, he will tell us how long the system has been running, and the load and the user.

Display Content Description:

17:13:55//System Current Time

Up 7:46,//host has run time, the greater the time, the more stable your machine.

1 users//user connections, is the total number of connections rather than the number of users

Load average//System average load, statistics last 1, 5, 15 minutes of system average load then what is the system average load? The average system load is the average number of processes running in a queue during a specific time interval.

If the current number of active processes per CPU core is not greater than 3, then the performance of the system is good. If the number of tasks per CPU core is greater than 5, then there is a serious problem with the performance of this machine.

If your Linux host is 1 dual-core CPUs, when load Average is 6, it means that the machine is fully used.

The following commands are most appropriate when we need to focus on our memory usage

He comes out a lot of things, right, but the main thing we usually care about is the buffers and the cache. As for the above understanding are good, slowly we knock more, naturally understand what each means

Some of the relevant notes:

Mem: Indicates physical memory statistics

-/+ buffers/cached: Cache statistics representing physical memory

Swap: Indicates the usage of the swap partition on the hard disk (we don't care here)

Total physical memory of the system: 988M (1G), but the actual memory currently available to the system is not the 810M of the first line of the free tag, it represents only unallocated memory.

The difference between cache and buffer:

Cache: Caching is a small but high-speed memory that sits between the CPU and the main memory. Here we just know this command, and we'll show him how to look at the problem later.

Clear command is the meaning of clear screen, when you hit more on the screen, look at the chaos needs, want a clean screen, you need him, the specific operation is to enter the command.

Alias This command is related to the alias of the command, as we now want to disguise a command as something else. For example

We can see that the command alias has changed, and when you enter the RM command, the following occurs, saying that the command does not exist.

Of course, such a command alias restart will be gone, if you want to permanently, we will be in the security, here we will look, alias name can be.

History is a word that must be known to all of us, and in the order that he can see all the commands we've knocked before.

User class commands

  1. The Useradd command can create a new user account with the most basic usage of:
    Useradd User Name
    If you enter the following command:
    Useradd Lele
    The system will create a new user, Lele, who has a home directory of/home/lele.
    The parameters of the Useradd command are many, and the commonly used combinations are:
    Useradd User name-G Group name-G group name-D Home directory name-p password
    Where:-g Specifies the user's first group
    -g Specifies the user's secondary group
    -d Specifies the user's home directory
    -P Specify the password for the user
    If you enter the following command:
    Useradd lele–g lelezu–g jiji–d/home/oracle–p 123456
    The system will create a user Lele Lele the first group of users is Lelezu, the secondary group Jiji,home directory is/home/lele, and the password is 123456.

  2. Userdel
    The Userdel command is used to delete an existing account with the following usage:
    Userdel User Name

  3. Groupadd
    The Groupadd command can create a new user group with the most basic usage of:
    Groupadd Group Name
    If you enter the following command:
    Groupadd group2
    The system will create a new user group, group2.

  4. Groupdel
    The Groupdel command is used to delete an existing user group with the following usage:
    Groupdel Group Name

  5. passwd
    For system security reasons, each user in the Linux system has its own user password in addition to its user name, and the user can change his or her password with the passwd command at any time. The general format of the command is:
    passwd
    After entering this command, follow the system prompts to enter the password and password confirmation, you can complete the user password modification.
    In addition, the superuser can also modify the password of other users, the command is as follows:
    passwd User Name

  6. Su
    The SU command is important because it allows a normal user to have access to a superuser or other user, or to allow a superuser to do something as a normal user. Ordinary users must have a password for the superuser or other user when using this command. To leave the current user's identity, you can type the exit command, and the general form of the SU command is:
    su– User Name

Disk class Commands

The disk is an important device, for his command orchestration, I kinda do not know how to explain the best, here I would like to tell you what I want to say, in the back we do a topic on disk

FDISK is a disk partition management tool under Linux

The commonly used parameters are:

Fdisk-l View the number and partition of the hard disk mounted by the machine;

Fdisk/dev/sdb runs into a new command prompt interface for Disk Management:

m display Help information;

P Print out the current disk partition; n add a new partition; d delete a partition;

W write to disk partition table and exit; Q exits but does not save

Now that we've created the partition, we're going to format it, and the formatting means writing the filesystem to the disc. How to format it? It is also very simple as follows

Mfks-t Ext4/dev/sdb61

The Mount command is the specific use of the Mount CD as follows

Before using the optical drive, mount it first: Mount/dev/cdrom/mnt/cdrom, then you can enter the/mnt/cdrom directory to read the contents of the CD-ROM;

Use the Umout command to Umount/mnt/cdrom when you want to uninstall.

Note: Because everything under Linux is file, when we want to read the contents of the disc, we need to mount it in a directory, so that when we access the directory is to access the CD-ROM.

The parted command is similar to FDISK except that he is partitioning a hard drive larger than 2T. We won't talk about it here, but we'll explain the disk partitioning later. Here we know it's okay.

Network class commands

The name of the network class is very frequent , and Such commands must be mastered. Specific as follows

What do we do when we want to see the IP address of a single host? Don't worry, ifconfig command can help us solve the following

I have an IP address now how can I know if I can surf the Internet? Use the ping command, as follows

is not very simple! Everybody just heart, really not difficult!

Have children's shoes said I want to track down my visit to a site through those paths, this is also possible, traceroute command can help us solve, such as we want to track down my here to Baidu after how many nodes are as follows

The above is the result of my tracking, as for some can not see, is *, that is because the times hidden.

And we all know that there must be an IP behind a domain name, then how do we view IP based on the domain name? It's also very simple.

We should now know that we are able to surf the internet because of the NAT address translation, because the private IP address is not Internet access, but through Nat converted to a public IP can be, we know we need a router on the Internet, routers also have IP. Router IP is the gateway, there is a router to send our data to the public network, then how to view the gateway? Don't look down.

This is the result that I check see, simple. Also we can use this command to configure the gateway, here I do not say more, why? Simple, in order to facilitate everyone to learn, we now just put a command of a function to remember, the function of the back let you knock once again, naturally will. Learn to command not to too much. We'll be here today. In the next section we will continue our order classification.

Linux System user Network Disk command

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.