Linux FAQ (1)

Source: Internet
Author: User
Article title: Linux FAQ (1 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Q: What is the difference between Open Source and Free Software?
  
A: Open Source is a market-oriented marketing tool for Free Software. it supports Free Software and tends to focus more on actual results rather than ideological propaganda. In layman's terms, Open Source has become an "Certified trademark" and can be used for software that complies with the definition.
  
Q: My network card cannot work normally in my Linux system. what should I do?
  
A: use ifconfig for configuration. If you run ifconfig, all installed NICs are displayed. If no available Nic is displayed, it may be one of the following reasons: 1. the NIC is not detected by Linux. 2. no corresponding kernel module; 3. this module is not loaded; 4. linux does not support your Nic. For now, the possibility of problem 4 is very small. generally, problems 2 and 3 may also be 1.
  
Solution: First, you can use the following command to view the hardware used: less/proc/pci/(assuming that the pci card is used ). Find "Ethernet Controller" in the displayed list and write down the vendor and model. Then use modprobe to load the correct module, such as modprobe 3c509. If an error occurs, the module does not exist. At this time, you should find the correct module and recompile it. If it is displayed that the device does not exist, it is also because there is no correct module. Find the correct module and compile it to solve the problem.
  
Q: Is it more helpful to prevent hacker attacks if the source code is not open?
  
A: The answer is No. Obviously, it is impossible to achieve security through hiding. The reason is that those who damage security are often more passionate and patient. Whether the source code is open or closed, they will always find vulnerabilities. Such examples are everywhere.
  
In addition, the view that the closed source code is safer actually makes three serious mistakes:
  
1. they create a wrong sense of security, that is, to make people do not know that there are errors, and thus think that the system is safe;
  
2. they think that people will not discover and fix these vulnerabilities;
  
3. for systems with closed source code, it is very difficult to distribute trustworthy patches when a vulnerability is disclosed;
  
In fact, open-source operating systems and applications are usually much safer than their corresponding closed opponents. There are no more examples.
  
Q: Can I ask Free Software, Proprietary Software, Freeware, Software sharing, and Commercial Software) what are the similarities and differences between these concepts?
  
A: "Free software" refers to software that allows anyone to use, copy, modify, and distribute (free of charge or at a small cost. In particular, the source code of such software must be available. In a sense, "without source code, it cannot be called a free software ."
  
"Proprietary software" is not a free or non-free software, and its use, dissemination or modification is prohibited. you may need to apply for a license when necessary, or it limits you to not be fully free to use it.
  
There is no clear definition of "free software", but it usually refers to software packages that allow distribution but do not allow modification, that is, the source code will not be provided along with the software. These Software packages are not Free Software, so do not confuse the concepts of "Free Software" and "Freeware.
  
Shared software allows users to distribute the software, but anyone who wants to continue using it will have to pay the license fee. Shared software is not free software. Because most shared software does not provide source code, you cannot modify the program. In addition, shared software cannot be copied and distributed without paying license fees, even if you are for a non-profit purpose.
  
Commercial software is developed by commercial companies and is profitable by collecting usage fees. Please note that "commercial" and "private" are not the same thing! Most commercial software is "proprietary", but there are also free commercial software, as well as non-commercial, non-free software.
  
Q: What is the relationship between open source code and Linux?
  
A: Linux is an open-source operating system, and is the most successful open-source platform by now. However, not only Linux is open source software, but also many successful software, such as Apache, are open source software.
  
Q: I usually use vi to edit files. Some spaces will appear in front of each line during the paste operation. what is the reason. How can we avoid these spaces?
  
A: If you run the set command, you will find an attribute named "autoindent. You can use the set noautoindent command on the editing screen to disable this attribute. In this way, the problem is solved.
  
Q: I downloaded a. ISO file from the Internet. What should I do if I want to know the specific content, but I don't have a lithography machine?
  
A: Follow these steps to view the file content:
  
1. run the "# mkdir/mnt/iso" command to create a mount point;
  
2. mount the. iso file: # mount? T iso9660? O loop mandrake80-inst.iso/mnt/iso;
  
3. browse the/mnt/iso directory.
  
Q: When I open Microsoft Windows files in Linux, I find the following problems occur in the files:
  
This is a ^ M
  
Used for testing ^ M
  
File ^ M
  
How can I remove ^ M?
  
A: There are many ways to solve this problem. Here are some of them:
  
1. run the command: cat filename1 | tr-d "^ V ^ M"> newfile;
  
2. run the following command: sed-e "s/^ V ^ M/" filename> outputfilename. Note that in methods 1 and 2, ^ V and ^ M indicate Ctrl + V and Ctrl + M. You must enter the file manually instead of pasting it.
  
3. processing in vi: first open the file using vi, press ESC, and then enter the command: % s/^ V ^ M //.
  
Q: I don't want everyone to use the "su" command to grant root permissions, but only want some people to have this permission. What should I do?
  
A: The specific method is as follows:
  
Run vi/etc/pam. d/su to open the su configuration file and add the following two lines at the beginning of the file:
  
Auth sufficient/lib/security/pam_rootok.so debug
  
Auth required/lib/security/pam_wheel.so group = wheel
  
After adding these two lines, your/etc/pam. d/su may be similar to the following:
  
# % PAM-1.0
Auth sufficient/lib/security/pam_rootok.so debug
Auth required/lib/security/pam_wheel.so group = wheel
Auth required/lib/security/pam_pwdb.so shadow nullok
Account required/lib/security/pam_pwdb.so
Password required/lib/security/pam_cracklib.so
Password required/lib/security/pam_pwdb.so shadow use_authtok nullok
Session required/lib/security/pam_pwdb.so
Session optional/lib/security/pam_xauth.so
  
Now, only members in the wheel group can have root permissions through su.
  
Q: What should I do if I want to solve some files from the. rpm file but I don't want to install it?
  
A: You can use "rpm2cpio" to extract file commands from the RPM document, as shown below:
  
$ Rpm2cpio Xmms. cpio
  
Note: in this command, the file will be decompressed to the current directory.
  
Q: I have never been clear about what Apache means. can you tell me?
  
A: This question is a long story. Prior to the rise of global information networks, Rob McCool, working at NCSA (National Center for Supercomputing Application), developed the NCSA HTTPd web server. This server can be downloaded for free and has powerful functions, so it is very popular. By the second half of 1995, its market share had already ranked first in the world. The original core of the Apache server is derived from the NCSA HTTPd server, which is then formed by adding patch files provided by various parties. This combination makes this HTTP Server A Patchy Server, which is called A repair and makeup Server ". "A Patchy" and "Apache" are homophonic English, so they gradually evolved into Apache, which has been used since now.
  
In addition, NCSA HTTPd has stopped development and its final version is 1.5.2a. The NCSA HTTPd development team publicly recommends that you switch to the Apache server.
  
Q: I have installed Linux on my computer so that I can study while working. The problem is that there are always people who want me to send their documents in Microsoft's Word format. In this way, I have to switch back and forth between the two systems. Is there any simpler way?
  
A: of course. In fact, you do not have to install two operating systems. In Linux, you can convert the file into an HTML file, and then execute the command cp file.html file.doc, and then send the. doc file. Microsoft's Word will automatically import it.
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.