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 to use the common command type in Linux

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

Share

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

Editor to share with you how to use the Linux command type. I hope you will get something after reading this article. Let's discuss it together.

Linux common command type command is used to display the type of specified command and to determine whether the instruction given is an internal instruction or an external instruction

Syntax type (option) (parameter) option-t: output "file", "alias" or "builtin", indicating that the given instruction is an "external instruction", "command alias" or "internal instruction" respectively;-p: if the instruction given is an external instruction, its absolute path is displayed;-a: in the path specified by the environment variable "PATH", the information of the given instruction is displayed, including the command alias. Parameters.

Instruction: to display the type of instruction.

Instance [root@localhost ~] # type lsls is aliased to `ls-- color=tty' [root@localhost ~] # type cdcd is a shell builtin [root@localhost ~] # type datedate is / bin/date [root@localhost ~] # type mysqlmysql is / usr/bin/mysql [root@localhost ~] # type nginx-bash: type: nginx: not found [root@localhost ~] # type ifif is a shell keyword [root@localhost ~] # type whichwhich is aliased to `alias | / usr/bin/which-- tty-only-- Read-alias-show-dot-show-tilde' [root@localhost ~] # type-a cdcd is a shell builtin [root@localhost ~] # type-a grepgrep is / bin/grep

After reading this article, I believe you have a certain understanding of "how to use Linux commands type". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

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