Record the Linux Learning Process

Source: Internet
Author: User


Record the Linux learning process preparation successful installation: VMware-workstation-full-7.1.4-385536.exe 571 MB [CentOS.5.5 32bit]. CentOS-5.5-i386-bin-DVD.iso 3.89 GB encountered a problem :( 1) putty login after a successful login as: window, how to operate? Www.2cto.com putty is used for SSH. login as: enter your login account and ask the Administrator to give it to you. password: The cursor does not move after it appears because putty does not display the password, a bit like the ftp of cmd, after the input, press enter to directly manage remote linux. (2) a Super User can create a New user account. The following command creates a New user named zxy: # adduser zxy # passwd zxy New UNIX password: (enter the zxy password) retype new UNIX password: (enter the zxy password again) (3) the ls command does not show the directory such as bin. Enter the command cd/, enter the system root directory, and then enter the ls command. (4) mkdir create directory rmdir Delete directory cd switch directory (. indicates the current directory... indicates the upper-level directory ~ Indicates the current user's personal directory) pwd displays the current directory (5) Enter vi to enter vi Editor (6) in the last line mode, enter the command: q, the system exits Vi and returns to shell. (7) how to install gcc in linux and check whether the gcc compiler is installed? Run the command rpm-qa | grep gcc to view the version number, and then run gcc-v to view the version number. Gcc-4.1.2-48.e15gcc-gfortran-4.1.2-48.e15libgcc-4.1.2-48.e15gcc-c ++-4.1.2-48. e15 (8) use a method similar to (7) to check if gdb is installed. Run the command rpm-qa | grep gdb to check whether the file is installed. Then run gdb-v to view the version number (9) linux new file. Method 1: Enter vi test on the command line. cc creates a new file test. cc. If yes, it is enabled. Method 2: touch test. cc creates a new file named test. cc (10) vi and inserts information when editing the file. After entering the text, press "I" or "s". After the editing is complete, shift + ZZ is saved. After www.2cto.com (11), how does one exit the vi editor in linux? First Press esc, then enter: q!, Disk logout input: wq, including the colon. (12) how to run the compiled a. out file in linux ?. /. Out (13) Use gdb to debug test. cc generates the executable file gcc-g-o test. cc. Note that you must use the-g parameter. The compilation will add debugging information. Otherwise, you cannot debug the execution file and start debugging gdb test to view the source file list 1. Press enter to repeat the previous command and set the debugging breakpoint break 16, set a breakpoint in row 16th, and view the breakpoint information in info break (I B can also be used) to debug and run the input run or r single-step debugging, step or s enter the function to view the print variable name or p variable name www.2cto.com to view the function stack bt, exit function finish and continue running until the next breakpoint or main function ends. continue or c Exit debugging. Enter q or press ctrl + d.
(14) Compile with gcc. there are two solutions to the "undefined reference to '_ gxx_personality_v0'" Problem in the cc file: 1. to compile c ++ programs in Linux Develop Notes, you must add-lstdc ++ option. sample: gcc-lstdc ++-o test. c. Otherwise, "undefined reference to '_ gxx_personality_v0'" Error 2 is reported. use the gcc command to compile the C program, and use the g ++ command to compile the C ++ program. The above error is reported by gcc-g-o test. cc and changed to g ++-g-o test. cc. Author one_in_one

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.