Introduction to programming tools in Linux

Source: Internet
Author: User

Chapter 1 Basic Linux commands-file and directory operations

1. Use bash for Interaction

Command completion, history, and keyboard shortcuts

2. file and directory operations

CD, PWD, mkdir, rmdir, and touch (update the access and modification time of each file to the current time. If the file does not exist, create a file with 0 bytes.) Cat, CP (copy), tree (display file directory tree)

Rm (delete one or more files or directories in a directory), find (search for files in the directory), and which (find the program file of one or more Command commands, give absolute path), chmod (change the access permissions of files or directories), tar (create files and directories), Gzip (compress or decompress files)

Chapter 2 Basic Linux commands-process and disk management

1. process management and Job Control

PS (used to monitor the working status of background processes such as: $ PS to display background processes), Fg (move the specified background job or suspended job to the foreground for running ), BG (mentions the suspended process to the background for execution)

2. Disk and file system management

Mount)

Windows 95/98 common FAT32 File System: vfat

Windows NT/2000 File System: NFS

OS/2 File System: HPFs

File Systems for Linux: ext2, ext3

CD-ROM disc File System: iso9660

Umount (unmount the file system), DF (check disk space usage of the file system), du (count the disk space occupied by directories or files), DD (copy the specified input file to the specified output file)

3. Network Management

Netstat (displays network connection, route table, and network interface information, allowing you to know which network connections are currently in operation), NSLookup (query the IP address of a machine and other corresponding domain names), Ping (query user information, usually displays the user name, main directory, stagnation time, Logon Time, logon shell, and other information of a user in the System) and talnet (the user can log on to the remote host through this command, just like logging on to the local machine and executing the command)

4. Other commands

Man and alias (name of a specific value string, and then enter name in the command line, shell automatically interprets it as value), date (display and set the system date and time) clear)

Chapter 3 common Linux server configurations

1. FTP server and NFS server

Chapter iv vi and VIM

1. VI installation and configuration

Install Ubuntu Vim

Configuration File Location

Set syntax highlighting

Set Windows C/C ++ auto indent (Add the following set statement to Ubuntu Vim)

2. Move the screen

3. move the cursor by words

4. move the cursor by sentence

5. move the cursor by segment

6. move the cursor by segment

7. Screen scrolling

8. text insertion

9. Text Deletion

10. Undo)

11. Redo)

12. move text lines

13. Window splitting

14. Block Selection command

15. Search for replacement commands

16. Useful commands in c Programming

View man page (in command mode, place the cursor on the function name and press K to view man page directly)

Environment setting: Set nu displays the row number

: Set AI automatically shrinks rows

: Set Ts = 4 set a tab key to equal to a few spaces (you can write these options ~ /. Vimrc file (do not write the previous: Number), so that the VI used each time takes effect. Note: Do not rely too much on the function of displaying row numbers. The coordinate display at the bottom of the VI editing window is usually enough. To jump to a line, use the G command instead of the line number first,)

Move cursor

Refer to the vim user manual translated by zhaorufei for the use of vim 』

Chapter 5 GCC compilation tool

1. Common GCC modes (compilation mode and compilation connection mode)

2. common options (in many cases, the header file and source file are stored in a different directory, but the files must be stored in multiple directories during compilation, you can use multiple-l (lower-case) to specify various directories, such as $ GCC test. c-l .. /INC-l .. /.. /inc2-O test. Here, it is pointed out that another sub-directory contains inc2, which can be found at another two levels than the previous directory)

3. Warning

The most common option is the-wall option. There are many other options. Let's take a look at it ...... Du Niang, these options can be enabled or disabled.

Chapter 6 debugging tool GDB

1. Overview

GDB (GUN debugger) is the GNU Debugger. It is generally used with GCC (GUN Compiler Collection) and must be debugged using GDB, during program compilation, specify the-G or-ggdb compilation options, where-G is used to generate general debugging messages, and-ggdb is used to generate GDB-specific debugging messages. When-ggdb is used, the size of executable files is greatly increased.

2. Procedure for operating GDB

(1), $ gcc-G gdb_sample.c-O a.exe

(2) After $ GDB a.exe, we enter the gdb debugging environment.

(3) related basic commands F, L, R, and B (set the breakpoint in line 11th of code, command: B 11), C, p, N, S, Q

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.