Embedded Summary 2

Embedded Linux operating system,
learning content and objectives: introduce Linux, the Linux operating (command), Linux development tools (requirements: enough !! would use !!)

1, install Linux development environment:
vm virtual machine (pc simulation by means of software), why not choose a dual system? (Embedded developers to interact with the kernel will cause a system crash)
Linux distributions (version issued to the user's) redhat (centos7, Enterprise Edition) ubuntu (16.10,18.04) deepin

2, Linux introduced (the POSIX, GPL, GUN)
GPL agreement: linux development based on the GPL (open source, allowing anyone to modify the source code).
GNU Project: gun is not unix; the goal is to create a completely free operating system, the advantage is to have lots of great tools such as gcc, gdb.
(Father of the C language: Dennis Ritchie == unix father)
the POSIX standard: POSIX for the Portable Operating System Interface defines the operating system should provide for the application, POSIX standard
interface standard, is a cross-platform conditions.

3, Linux usage (VS Windows)
Linux Positioning: Developers (efficiency)
win32 positioning: ordinary people (simple)

Linux use: goal: from mouse - command 1000+
learning objectives: 60 -20 command command
learning methods: back, remember, practice
Linux operation and maintenance engineering
of embedded Linux (80 months)
different releases have some unique command (software development)

root: Superuser (has all rights)
jsetc: ordinary users (restricted)


Linux command


User Management Commands

(1) The user switches su
user manual man: man command
eg ordinary users to switch to the root:. Su - the root / su
the root switch to common user jsetc: su - jsetc
(2) right to upgrade the sudo
(when some operations without permission can be used sudo get advanced permission or with the use of root)
(3) add a user adduser
(4) delete the user deluser
(5) Change password passwd

File manipulation commands
(1) view the current directory LS
Linux a little philosophy: everything is a file
classification Linux files: regular files - directory files (beginning d) (beginning c character device b block device /) (at the beginning), device file, link file (beginning L)
Linux special files: file pipe (p), the stack file (f), shared file (s)
operating authority Linux file: R- readable (weights 4), w- writable (weight 2) , X-executable (weights. 1)
eg.rw--RX. 5. 6. 7-rwx
authority description: group 3 (current user, the current user group, other users)
LS - L
LS - D
(2) modify file permissions the chmod
EG . chmod uw hello.c (u represents the current user, ux executable attribute representative of subtracting x)
the chmod + x hello.c A (A on behalf of all users,)
the chmod + x hello.c g (on behalf of the current user group g)
the chmod 655 hello.c = -rw-r-xr -x
created (3) file Touch
eg.touch hello.c
(4) to view the contents of the documents CAT
eg.Cat hello.c
deleted (5) file RM
eg.rm the Hello .c
forcibly remove f-RM
(6) editing the file gedit vim gvim- text editor (rarely used)
excellent IDE: vscode
(7) compile the file: gcc compiler to
execute commands ./+ file name (./a.out)

Directory operations command
(1) cd directory to find
the current directory cd.
Go back one level cd ...
the current user's working directory ~ cd
(2) Create a directory mkdir
EG, mkdie 0303 kk mm (3 in a row to create a table of contents)
(3) Delete directory r-RM
RM-fr silently delete information directory
rmdir can only delete non-empty directory
mkdir-p create a directory path from the written
* root directory cd /: the parent directory of all files (all files are stored in the directory)
cd / +:
bin: to store common user system command
sbin: storage administrator command
dev: device to store all file system
etc: all system configuration files are stored in the
home: storage of the average user's working directory
root: root user to store work directory
usr: storage software (libraries, header files) installed in the system

Absolute and relative paths:
the method proceeds to: 1) the relative path cd class_c ++ / (current C ++)
2) absolute path cd / root / class_c ++ (must be entered only a directory)
difference: the absolute path from the start at the root, the relative path from the current directory

Commonly used commands:
(1) copy cp
cp hello.c 0303
cp /root/hello.c / root / 0303 / (absolute path to copy the file)
cp -r / root / 0303 / kk / root / 0303 / (absolute path copy directory )
(2) shear Music Videos
Music Videos hello.c mm (to cut the hello.c mm)
Music Videos KK KK1 (may rename the file)
(3) clear the screen clear, RESET
(. 4) compression cvzf the tar
eg.tar cvzf hello.tar.gz.hello.c (hello.c compressed to a)
(5) xvzf extracting the tar
EG. extract to the specified directory -C hello.tar.gz 0303 xvzf the tar
(. 6) to restart reboot
(. 7) shutdown shudown

Released four original articles · won praise 0 · Views 202

Guess you like

Origin blog.csdn.net/weixin_43688481/article/details/104758581