Learn Linux notes (i)

Source: Internet
Author: User
Tags file handling object model

recommended sentence: As long as patience, any capable person can become the peerless coder, of course, including you.

Learn Linux Summary: Ubuntu with Apt-get Management Pack, Redhat system Yum

Linux is divided into four parts: Linux kernel, GNU use program, graphical desktop environment, application software.
The kernel has four functions:

Program memory management (using virtual memory, physical memory, swap memory), common directives #cat/proc/meminfo

software program Management (with file Inittabs management initialization process), location/etc/inittabs, command #ps AX

Hardware management (kernel recompilation, adding driver modules to the kernel, adding sub-bytes (device files of the lower-level modulator Class), blocks (disks with a large number of data blocks), network devices (devices that use packet-sending and receiving) system to create special files for the above devices, called nodes, with unique digital pairs to label the packets, often #ls-al sda* ttys* with command

File System Management, unlike other operating systems, the Linux kernel uses different types of file systems to transfer data to and from a hard disk.
GNU utility, Shell's core program.
Graphical desktop environment, GNOME Desktop (GNU Network Object Model Environment)

Bash Shell:echo $ps 1/2 to view the current prompt format
Man bash/specific instructions, feature detail list, Space page
The Linux system files directory is a virtual directory structure that contains a basic directory, which becomes the root, and the directories and files of the root directory are listed according to the path to reach them, roughly similar to Windows. There is the difference between a forward slash and a backslash, and Linux is a forward slash that represents a file directory, but a backslash instead of an escaped flag.
The most magical part of the Linux virtual directory is the way in which each storage device is combined, in the root drive, Linux creates some special directories called mount points, the mount points are

The directory where the virtual directory is used to allocate additional storage devices is the root association of a hard disk with the virtual directory, such as the location of the user directory that is attached to the home location.

General Linux Directory file Description:

/bin: Binary directory that stores many GNU user-level utilities;

/sbin: System binary directory, which stores many GNU administrative level utilities;

/boot: Boot directory, store boot file;

/dev: Device directory, Linux in this directory to create device node;

/etc: System configuration file directory;

/home: Main directory, Linux create user directory in this directory;

/lib: library directory, storage system and application library files;

/MNT: Mount directory, another removable media device commonly used mount point;

/media: Media directory, removable media devices commonly used mount point;

/OPT: Optional directory, common term storage optional software package;

/root: root master directory;

/tmp: temporary directory, storing temporary working files for creation and destruction;

/usr: The directory where the user installs the software;

/var: Used for frequently changing files, such as log files.


Learn CD command: Absolute path, relative path (./or. /);
File list: Ls-f (forward slash = directory)-A (show Incognito)-L (Details)-R (Show directory file)-I (Display index number) filter list output: LS- l test (this is the keyword, can be used?) or wildcard characters)

File handling: Touch creates an empty file,-t specifies timestamp, CP copy file,-r recursive copy file,-r recursive directory,-P keep copy time in source file, mv Move or rename file, rm Delete file,-R recursive delete.


mkdir directory creation, rmdir delete empty directory.

Stat: View file statistics, File: View files type, three kinds, text files, executable files, data files.
Cat: View entire file,-n display number,-B displays character number only
More: Pagination shows the entire file, less is also, more powerful than more, can load the entire file before displaying the total number of file data, line number range.

Tail: 10 lines After viewing the file, head: View the first 10 lines of the file----lines show how many rows before and after.


PowerTOP is an open-source command-line tool for diagnosing power issues and viewing how active software applications are in the system. In addition, it provides an interactive way to experiment with various power management settings.

Install, choose a different installation command depending on your system version.

Ubuntu 14.04 User Install command:

sudo add-apt-repository ppa:tsvetko.tsvetkov/trusty-backports
sudo apt-get update
sudo apt-get install PowerTOP

Uninstall command:

sudo apt-get remove PowerTOP

Learn Linux notes (i)

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.