C Language Development tutorial notes in linux

Source: Internet
Author: User
Notes for C Language Development tutorials in linux-general Linux technology-Linux programming and kernel information. For more information, see the following. I started the C language development tutorial in linux today. I made some notes and pasted them. They are all basic things.

Gcc c language source file compilation command: gcc-o hello. c

Glibc has two installation methods:
A. Install it as A function library for testing B. Install it as A main function library

The c Development Environment corresponds to eight packages (versions may be different ):
Cpp-
Binutils-
Glibc-
Glibc-kernheader-
Glibc-common-
Gcc-
Make-

Create folder command mkdir

View glibc version
Ls/lib/libc -*

View gcc version
Gcc -- version

Common commands in the vi Editor
Vi go to the editor
I enters the insert mode. You can enter text
Esc exits the insert mode and enters the command line (bottom line) mode.
: Log out of the wq disk.

In linux, any file can be used as an executable file, as long as the executable permission is attached to it. For shell script files, although you can not add a suffix, it is best to add a suffix file. sh

Shell commands
Echo "xxxxxx" displays information on the screen
# Adding comments to xxxxx will be ignored by shell without generating any information
Create variable (variable name) = Value
Reference variable 2 =$ {Variable 1}
Read value to variable read variable name
Environment variables, such as HOME, PATH, PS1, PS2.LOGNAME, SHLVL, SHELL
HOME variable. After a user logs on, the corresponding HOME directory command is echo $ HOME.
Related Article

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.