”, “-p Home >
Article > Operation and Maintenance > How to use which command in Linux? The function of which command in Linux is to search for the location of a certain system command in the path specified by the PATH variable and return the first search result. Its usage is "which [file...]" , its parameters include "-n59ffcea55aee92a7bc38770bb38c7fa7", "-p59ffcea55aee92a7bc38770bb38c7fa7", "-w" and "-V". Linux which command is used to find files. which command will search for files that meet the conditions in the directory set by the environment variable $PATH. which Syntax which Parameter -n59ffcea55aee92a7bc38770bb38c7fa7 Specifies the file name length, specified The length must be greater than or equal to the longest file name of all files. -p59ffcea55aee92a7bc38770bb38c7fa7 Same as the -n parameter, but the 59ffcea55aee92a7bc38770bb38c7fa7 here includes the path of the file. -w Specifies the width of the field during output. -V Display version information. which Example Use the command "which" to view the absolute path of the command "bash", enter the following command: After executing the above command , the output information is as follows: Recommended tutorial: "Linux Operation and Maintenance" The above is the detailed content of How to use which command in Linux?. For more information, please follow other related articles on the PHP Chinese website!How to use which command in Linux?
which [文件...]
$ which bash
/bin/bash #bash可执行程序的绝对路径