Linux_ operation

date: (- set, set) the date and time display function

lscpu: cpu will print the details of the information terminal

free-h: print memory, -h option means to convert the result to a more appropriate display unit

sudo: carrying administrator privileges command back then, the command is executed, because under normal circumstances is not the default administrator (root) privileges

sudo fdisk -l: fdisk displays disk information, so the information listed option -l represent disk

lsusb: find so USB peripherals

uname: (- m, cpu type output), the information system of the printing operation, -a after adding parameters, print information about the details of the operating system

ifconfig: print out the details of the information ip address, on behalf of etho Ethernet interfaces, wlan0 representatives wifi interfaces, lo is out of the virtual local interface

2. Raspberry pie dedicated query

vcgencmd: View hardware status

parameter:

measure_temp: measure_temp is a command parameter, this parameter returns the actual temperature of the cpu

measure_volts core: the core voltage detection

View BCM2835 Soc temperature

vcgencmd measure_temp
codec_enabled CODEC: Check whether the decoder is turned on

codec_enabled codec: Check whether the decoder is turned on

 

 

 

A shell is what?

Unix shell is interactive pages of text, as long as the command name with the system operation can be carried out

which: it can be carried out to determine whether an executable file by this command

alias: a command to another name, alias freak = "freak -h", meaning that when the input freak, equivalent to freak-h

type: understand the type of command

Learn how a new command:

whatis: a very brief statement statement to describe this command

man: print out the details of the command information

info: More details of the return information

 

 

nano editor operations:

Followed immediately file name, if the current directory exists open, or create

hot key:

crtl + O-- save, crtl - X is the exit

The representative of the ctrl key, M for alt, on behalf pressing Ctrl and G ^ g

Tips:

M- \: Move the cursor to the beginning of the text

M- /: Move the cursor to the end of the text

^ K: Cut selected text

M-6: Copy the selected content

^ U: Paste

^ G: Help

After nano save the file will be generated in the current directory

 

cp: copy files, copy the file name of the new file name

rm: deleting files

mv: certain file location, if not the absolute position is equivalent to rename

pwd: output current path, in the same directory, there can not file with the same name, but you can change the directory to create the same file name

 

 

Raspberry Pi configuration;

Password: sudo passwd pi

Setting wifi connection:

Need to modify the configuration file

Nano the sudo / etc / wpa_supplicant / the wpa_supplicant.conf 
Network = { 
        SSID = " WIFI_NAME " 
        PSK = " wifi_password " 
} 
to add a plurality of wireless network configurations 

  may be used to distinguish between two custom id_str WiFi 

Network = { 
    SSID = " wifi_name1 " 
    PSK = " wifi_password1 " 
    ID_STR = " Class1 " 
} 

Network = { 
    SSID = " wifi_name2 "
    PSK = " wifi_password2 " 
    ID_STR = " Class2 " 
} 

  If you have a range of two networks, can be added to the priority option to choose between them. The range of the network with the highest priority will be the network connection. 

Network = { 
    SSID = " wifi_name1 " 
    PSK = " wifi_password1 " 
    priority =. 1 
    ID_STR = " Class1 " 
} 

Network = { 
    SSID = " wifi_name2 " 
    PSK = "
    priority = 2 
    ID_STR = " Class2 " 
} 

Add WIFI network without a password 

  added to no WIFI network passwords just key_mgmt set to NONE 

Network = { 
        SSID = " WIFI_NAME " 
        key_mgmt = NONE 
} 

to see if the wifi connection successfully 

  after the configuration We need to restart raspberry Pi, in order to see whether the configuration. 

ifconfig wlan0
Configuring wifi

 

 

 

Shutdown

sudo shutdown -h now
sudo halt
sudo poweroff
sudo init 0

 

Restart

sudo reboot
shutdown -r now
shutdown -r 18:23:52 #定时重启在18点23分52秒关闭

 

Software upgrades and installation

sudo apt-get update: Get the latest software list

sudo apt-get upgrade upgrade the installed files

sudo apt-get install mysql: mysql installation

Software uninstall and delete

sudo apt-get remove mysql: delete the software, configuration files are not deleted

sudo apt-get purge mysql: uninstall software, delete profiles

 

 

ssh connection

May be connected by the ip address of the router xshell

Raspberry Pi can be queried by ifconfig ip address

 

 

File transfer:

If it is Linux or macOS system, you can transfer files via sftp command

 sftp [email protected], the password may be connected

$ Ls: view files on the local computer

$ Lls: view files on a remote computer

$$ pwd: View the current path of Raspberry Pi

$$ lcd: go back one level

$$ get remote.file: come in to download files from raspberries

 

 

GPIO

Knowledge in this regard does not yet have replenished

 

Daemon:

Into the configuration file etc / motion / motion.conf

The need to guard the process is set to yes

 

file:

The file system can be seen as a tree, the tree node is a directory of files, subdirectories pi become home, and home is the parent directory of pi, the absolute path to understanding the principle,

Read the home directory to find the file directory location of the file, how to read pi from home, then layer by layer to find, ultimately directory you want files to be read

 

File Operations

touch file: create a file by touch

mkdir: create a new directory

rmdir: delete a directory

cp: cp command to supplement the above, after the addition -r parameter can copy a whole directory tree

 

File Search: You can traverse the file system by the find command

find / -name "* .c" will be printed as a suffix .c files on the hard disk

locate: find command with the same, but the shrewd

locate the file: Find files -i ignore case, l * t, l have been the beginning of a file ending in t

 

 clear: Clear Screen

ps: you can list the programs that are running

 

 

 



Guess you like

Origin www.cnblogs.com/Alom/p/12112556.html