Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does the Linux system view file paths

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This "Linux system how to view the file path" article, the article sample code introduction is very detailed, with a certain reference value, interested friends must refer to, for the "Linux system how to view the file path", Xiaobian sorted out the following knowledge points, please follow the pace of the editor step by step slowly understand, then let us enter the topic.

1.which

Which is used to see the path of the current command to be executed

For example:

[root@admin ~] # which python / usr/bin/python

If I enter python directly, the output is the default execution path of the python command: / usr/bin/python

How the which command works: searches for the location of a system command in the path specified by the PATH variable and returns the first search result. That is to say,

Using the which command, you can see whether a system command exists and where the command is being executed.

Examples of use of the which command:

$which grep

2.whereis

Whereis is used to view the path where a command or file is located

For example:

[root@admin ~] # whereis python python: / usr/bin/python / usr/bin/python2.6 / usr/lib/python2.6 / usr/lib64/python2.6 / usr/include/python2.6 / usr/local/python / usr/share/man/man1/python.1.gz

Whereis will search for all files or folders with python in their names.

Whereis command principle: can only be used to search for program names, and only search for binaries (parameter-b), man description files (parameter-m), and source code files (parameter-s). If the parameter is omitted, all information is returned.

Examples of use of the whereis command:

$whereis grep

What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

The above is all the contents of the article "how to View File paths in Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report