"Linux Instance Encyclopedia" learning Note 1

Source: Internet
Author: User

Chapter 1-3

Auto-Completing

$ with environment variable ~ followed by username @ followed by host name

man command-f XXX can show all the XXX documents, such as some C is some sh. Similar Whatis

[Email protected] ~]# man-f mkdir
mkdir (1)-Make directories
mkdir (1p)-Make directories
mkdir (2)-Create a directory
mkdir (3p)-Make a directory

Then you can use the man 3p mkdir to see the specific

-k is to search all

containing xxx

[[email protected] ~]# man-k fopen
Tiffclientopen [Tiffopen] (3tiff)  -Open a TIFF file for reading or WRI Ting
Tifffdopen [Tiffopen] (3tiff)  -Open a TIFF file for reading or writing
tiffopen              (3tiff)  -Open a TIFF file for reading or writing
Fdopen [fopen ]       (3)  -stream open functions
fopen                 (3)  -stream open functions
fopen                 (3p)  -Open a stream
Freopen [fopen]      (3)  -Stream open functions

Both Whereis and whitch can find the path to the command. Whereis a little more comprehensive.

Date +%s print timestamp

fuser -A directory can look at all the processes that the directory starts with

-K can delete all processes under this directory

Gdialog Linux inside the installer dialog can be implemented, but does not seem to be combined, such as yesno can not be used with the textbox, can not only choose Yesno can also be read from the text inside the description.

If it is an input box or a menu class, it can be entered into the log with 2>>1.log, either InputBox or the menu class is not wrapped automatically.

Both the menu and the radio are output first. Odd choice, the first item in the output, but there's more out there.

hostname The host name can be changed after the name.

jobs can only display background programs for this connection (suffix &), and other connected daemons are not visible.

FG can show the contents of jobs from the back to the foreground.

Write root PTS/1 sends messages to other connections, and other connections are printed on the screen. You can use the WHO to see the PTS numbers for other terminals.

The ps-c httpd-o pid= can display the PID of a specified process and can be matched without awk.

The pmap process number can see the memory occupied by the library used by this process, but there is a [anon] don't know what it means--

YES|RM * can be implemented RM-RF * function, other combinations thought to note again.

Fc-l can see the action command for this connection, the FC line number begins with the end of the line number, can be edited by VI, and then automatically run the edited result.

pgrep Pkill does not exactly match the search process,-X is an exact match.

pidof shows all processes of the program, exactly matches.

Watch can periodically execute the program and refresh the screen in full screen.

alias defines aliases for the command, and only this connection is valid if alias Ll=ls-a.

Declare Displays the values of all environment variables.

LDD shows that the program relies on those libraries.

Fourth Chapter

/ETC/PASSWD inside the second is the password, but now all in/etc/shadow, but are MD5 encrypted password, password is! Indicates that the user is locked out of the login, passwd-l user name implementation.

userdel-r Delete the user at the same time delete the file.

Forget root password can use single user mode to enter the system, and then remove the shadow password.

When the system starts, enter the Grub interface, select Kernel/vmlinuz-xxxx ro root=lable=/Enter single to return to the parent menu and press B to start the command.

The same group is set in/etc/group and/etc/gshadow.

When a user belongs to more than one group, they only belong to a group after logging in, and you can use NEWGRP to switch groups.

AC Display login total time,-p by user statistics,-D to connect a few days to statistics.

Last show recent login status

lastd Displays the most recent logon failure condition. said the public network machine was swept very serious ah, I together in the public network machine gave the password 123456, the next day was changed by people password. Take a look at the lastd, a bunch of IPs trying to log in.

who displays logged-in user information.

W Displays the logged in user information and IP and the actions performed. But most normal operations will be hash.

WhoAmI displays its own user name.

logname displays its own user name.

Finger The current user's relevant login information, plus the user name is the user information, such as directory.

The ID displays all the groups to which a user belongs.

rwho See LAN users, but not very clear, if it is a public address, then not all equal to the local area network? But the public network is not displayed. But I tried a machine on the LAN, and there was no display, it was strange.

users displays the user name of all logged-in users

If/etc/nologin is present, then all non-root users are prevented from logging in.


This article is from "Flying Justice Blog" blog, please be sure to keep this source http://xzq2000.blog.51cto.com/2487359/1766784

"Linux Instance Encyclopedia" learning Note 1

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.