Category archives: Notes

RSS feed of Notes

Linux SSH login without password

client1: Linux Host
server1: Linux Host
client server Generate key(Public key and Private key), copy the Public key to server1

1.client1 Generate key

[root@client1 ~]# ssh-keygen -b 1024 -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root ...

Continue reading

Linux Process management command

Process management command

init: Process number is 1

Classification of processes:
     the processes associated with the terminal
     Terminal independent process

1.process state:

     D: Non interrupted sleep
     R: Run or ready
     S: Interrupted sleep
     T: Stop it
     Z:  Zombie state

     <:  High priority process
     N: Low priority process
     +: Processes in the foreground process group
     l ...

Continue reading

Linux software is not installed in the default directory

The software is not installed in the default directory of the solution

1.Modify the PATH environment variable to be able to identify the binary file path for this program:

   modified /etc/profile
  In the /etc/profile.d/ directory, create a file with names ending in .sh suffix, which write the  "export PATH=$PATH:/path ...

Continue reading

Linux File compression and Archive command

File compression and Archive command summary

compressed format: gz, bz2, xz, Z, zip Compression algorithm: the algorithm is different, the compression ratio will be different;


gzip: .gz 
  gzip /PATH/TO/SOMEFILE: gzip will delete the original file after the completion of the compression
  gzip -d: decompression
       -#: 1-9, specify the compression ratio, the default ...

Continue reading

Linux File Find command

File Find command


Non-real-time, fuzzy matching, lookup is performed according to the system-wide file database;
# updatedb, Manually generated file database (fast)

2. find: Find PathFinder standard look to a future process of operation

Real-time, accurate, supports many search criteria, traversing all the files in the specified directory lookup completed, slow;

Search Path: The ...

Continue reading

linux Sed (stream editor)

Sed (stream editor)

Stream EDitor sed: line editor
The default sed: mode space does not edit the original file, only the data in the mode space to do processing; and then, after the end of the processing, the pattern space is printed to the screen

sed [options]'AddressCommand'file file...

-n: silent mode, the default ...

Continue reading

linux vim editor note

vim editor

1. open the file

# vim /path/to/somefile
      vim + #: Open the file, and positioned at the first # line
      vim +: Open File, navigate to the last row
      vim +/PATTERN: Open File, navigate to the line the first time to the line matching PATTERN

2. close the file

1) line mode close the file
:q ...

Continue reading

Linux Vim commands Collection

Vim commands Collection

Command History

 To: and / beginning commands have history, you can type the first: or / and then press the down arrow to select a command history.

Start vim

Enter the following command in the command line window to

    [root@mylab]# vim

vim filename open vim or create a file named filename

    [root@mylab ...

Continue reading

Linux Redis 3.0.5 installation and configuration

Redis 3.0.5 on the Linux installation and configuration

1. Download the installation package

[root@mylab]# wget

2. Compilation and installation

[root@mylab]# yum install gcc tcl
[root@mylab]# tar -zxf redis-3.0.5.tar.gz
[root@mylab]# cd redis-3.0.5
[root@mylab ...

Continue reading

linux IO redirection

linux IO redirection

The default output device: standard output, STDOUT, 1
Default input device: standard input, STDIN, 0
Standard error output: STDERR, 2

Linux I/O redirection:

>: Override Output
eg. [root@mylab]# ls /var > /tmp/var2.out
>>: Append output
set -C: already prohibits the use of file redirection coverage
Force overwrite output ...

Continue reading