Basic knowledge about Linux: running applications

Source: Internet
Author: User
Article title: Linux basic knowledge: running applications. 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.
If you enter an executable file name in the command line without any response, there may be three situations:
  
3.1.3.1 you typed an incorrect file name
  
Linux strictly distinguishes uppercase and lowercase letters. therefore, make sure that the uppercase and lowercase letters are correct when you type a command. For example, neither Pico nor PICO can start the pico editor.
  
3.1.3.2 The executable file is not in the PATH specified by PATH
  
In Linux, the executable file must be in the PATH specified by the PATH environment variable. If the current directory is not in the PATH by default, you need to add a full PATH name before the executable file name to execute it, or perform the following operations:
  
Cd executable program directory
  
./Executable file name
  
You must add the dot and backslash before the executable file name; otherwise, the program will not execute (it is out of security considerations not to save the current directory in the PATH, this makes it difficult for Trojan Horse-type hacking programs to work ).
  
Use the following command to display the PATH value.
  
$ Echo $ PATH
  
If you want to know how to modify the PATH value or put the current directory into the PATH, see Section 3.1.4.
  
If you do not know the location of your executable file in the directory tree, you can use the following command to find it (for example, to find netscape)
  
$ Find/-name netscape
  
Or
  
$ Locate netscape
  
You can use the locate command to get the same result more quickly. It uses a pre-established database to work faster. This database is regularly updated by a background process called "cron.
  
For a root user, the PATH value is different from that of a common user. it generally contains/sbin and/usr/sbin based on the PATH value of a common user. Therefore, if a common user does not specify the complete path of a command during command execution, the command in the/sbin directory cannot be executed. Similarly, after a common user uses the su command to become a super user, the PATH used is still the PATH of the common user. therefore, to execute the/sbin command, you must explicitly specify the PATH.
  
3.1.3.3 the file may not have an executable attribute specified
  
If the file does not have an executable attribute, you can modify the attribute value to make it executable. For example, to change the file to an executable file, run the following command:
  
$ Chmod a + x file
  
This command will make the file executable to all users.
  
3.1.4
  
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.