Four ways to teach yourself Linux commands

Source: Internet
Author: User
Tags administrator password root access

Four ways to teach yourself Linux commands
Guide Children's shoes have just come into contact with Linux, in the learning process will encounter a lot of problems, learning Linux can not touch the mind, then the following four kinds of Linux learning methods, especially suitable for beginners.
method One: Terminal "Daily Tips"

In. BASHRC (/HOME/.BASHRC), add the following line:

echo "Did you know that:"; whatis$ (Ls/bin | shuf-n 1)

All you have to do is increase the line! If you want to make it more entertaining, you can install Cowsay. Install Cowsay under Ubuntu/debian:

sudo apt-get install Cowsay

Install Cowsay under Fedora:

Yum Install Cowsay

In addition to installing Cowsay, you need to add in. BASHRC:

Cowsay-f $ (ls/usr/share/cowsay/cows | Shuf-n 1 | cut-d.-f1) $ (Whatis $ (ls/bin) 2>/dev/null | Shuf-n 1)

However, the above approach to using Cowsay is not successful under all Linux distributions.

method Two: Command "Whatis"

If you are learning Linux and don't like random commands, then you just need to precede them with Whatis. Whatis will explain the commands you have entered.
Learncommands_whatis

The Whatis sudo yum install cheese example clearly tells you:
1) sudo is for you to have administrator privileges;
2) Yun is the package manager;
3) Install installs the package for Yum;
4) cheese is the software you intend to install.
This is not a good way to perform before complex or uncommon commands. But if you want to understand the general purpose of a command, this method is worth a try.

method Three: Command "man"

In the first contact with Linux children's shoes, more than the basic command is not very familiar with, and sometimes feel that the command parameters too much, and can not remember, there is a trick here, using the command "man+ command", the command of the detailed parameters and explanations are displayed: such as "Man CP":

Another easy and quick way to do this: command "-help". For example, "Cp-help" will print out a large number of uses of the CP command directly in the terminal.

method Four: Quickly understand the Linux command syntax

Here you can not only query the use of the Linux command with the Man command, but also quickly understand the basic syntax of the Linux command, for the understanding of the command is quite beneficial!

[sudo] program [parameter] [parameter] ... [Parameter] [-flag] [Parameter] [-flag] [Parameter] ... [Flag] [Parameter]
let me dissect the above structure in sections:

1. If a command requires Administrator privileges (root access) to run, you must precede it with "sudo". This allows you to use administrator privileges when you do not have an administrator password.

2. "Program" is the name of the application. It includes yum, apt-get, cheese, tar, CP, MV and Firefox, among others. If there is no additional configuration, all commands that can be accessed by this method are placed in the/usr/bin directory (translator Note: By default, programs in some other directories can run as well, such as commands under/bin). For many programs, you only need to enter their name in the terminal. For example, if you enter "Firefox" in the terminal, and then press ENTER, Firefox is up and running.

3. After the name of the program, you can use different parameters and flags. Different procedures vary widely in this regard. For example, the command "CP file1 file2" copies a copy and saves it as file2 in the directory where File1 is located. The "File1" and "file2" Here are the two parameters of the command "CP". Some commands also change their behavior by using different flags.

Summary

Learning Linux commands is really not difficult-once you've made up your mind and mastered the basic structure of Linux commands. However, the general study for several hours does not play a significant effect, then please do not give up. Repetition is the best way to learn. All you have to do is to strengthen your memory through constant practice. There are many resources to learn about Linux commands, such as the Linux command Quick Check table, the 40 important Linux commands, and the Linux command QuickStart.

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

Four ways to teach yourself Linux commands

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.