linux basic operations (1)

1. ls
  to view the files in the
current directory -a to view all the files in the
current directory -A to view all the files in the current directory but excluding this directory and the parent directory
-c to sort by change time and display all files
-l or ll to display file


permissions
  _


_
  _  
_
_
  _ :
cat -n file1>file2 Add the file content of file1 to the line number and enter the file into file2


4.cd
  switch the working directory


5.vi
  text editing
is divided into three modes: general mode, editing mode, command mode
i switch to editing Mode
x Delete the character at the current cursor position
: switch to large command mode
ESC, exit input mode, switch to command mode
Page Up/Page Down, page up/down
q Exit program
w Save file
wq Save and exit
q! Forced to exit
n represents a number, after the number input is completed, press the space bar and the cursor will move to the right by n units. In normal mode
/hello Searching for hello in the document is equivalent to ctrl+f in windows


6.chkconfig
 to view the service that starts automatically
chkconfig on open
chkconfig off close 


7.startx
 switch to the graphical interface


8.service network restart restart
  the network card service
network network service name , replace it with other services, you   can complete the restart of


its services     Display legend USER : Process owner    PID: pid    %CPU: Occupied CPU usage    %MEM: Occupied memory usage    VSZ: Occupied virtual memory size    RSS: Occupied memory size    TTY: Secondary device of the terminal Number (minor device number of tty)    STAT: Status of the trip:    D: Uninterruptible still    R: In progress    S: Still state   
















T: Suspend execution   
Z: Does not exist but cannot be eliminated temporarily   
W: Not enough memory pages to allocate   
<: High priority run   
N: Low priority run   
L: Memory page allocated and locked in memory (immediate   System or AI/O)   
START: travel start time    TIME
:    execution
time  Other information 11.shutdown/halt    shutdown command 12.reboot     restart














Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326021461&siteId=291194637