- Ubuntu 20.04 Essentials
- Neil Smyth
- 225字
- 2021-06-11 17:39:41
9.3 Entering Commands at the Prompt
Commands are entered at the shell command prompt simply by typing the command and pressing the Enter key. While some commands perform tasks silently, most will display some form of output before returning to the prompt. For example, the ls command can be used to display the files and directories in the current working directory:
$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos
The available commands are either built into the shell itself, or reside on the physical file system. The location on the file system of a command may be identified using the which command. For example, to find out where the ls executable resides on the file system:
$ which ls
alias ls=’ls --color=auto’
/usr/bin/ls
Clearly the ls command resides in the /usr/bin directory. Note also that an alias is configured, a topic which will be covered later in this chapter. Using the which command to locate the path to commands that are built into the shell will result in a message indicating the executable cannot be found. For example, attempting to find the location of the history command (which is actually built into the shell rather than existing as an executable on the file system) will result in output similar to the following:
$ which history
/usr/bin/which: no history in (/home/demo/.local/bin:/home/demo/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
- 平面設(shè)計(jì)初步
- AWS:Security Best Practices on AWS
- HBase Design Patterns
- 深度學(xué)習(xí)中的圖像分類與對抗技術(shù)
- Blender Compositing and Post Processing
- CentOS 8 Essentials
- 項(xiàng)目管理成功利器Project 2007全程解析
- 網(wǎng)中之我:何明升網(wǎng)絡(luò)社會(huì)論稿
- MCGS嵌入版組態(tài)軟件應(yīng)用教程
- 計(jì)算機(jī)組網(wǎng)技術(shù)
- 啊哈C!思考快你一步
- 電氣控制與PLC原理及應(yīng)用(歐姆龍機(jī)型)
- 大數(shù)據(jù)時(shí)代的調(diào)查師
- 軟件測試管理
- PVCBOT零基礎(chǔ)機(jī)器人制作(第2版)