This section contains Aptitude Questions and Answers on Linux Shell Commands.

本节包含有关Linux Shell命令的 Aptitude问答。

1) Which of the following command is used to check a Linux command is a built-in shell command or external command?

  1. cmdtype

  2. type

  3. ctype

  4. commandtype

Answer & Explanation

Correct answer: 2
type

The type command is used to check a Linux command is a built-in shell command or external command.

1)以下哪个命令用于检查Linux命令是内置的shell命令还是外部命令?

  1. 命令类型

  2. 类型

  3. 类型

  4. 命令类型

答案与解释

正确答案:2
类型

type命令用于检查Linux命令是内置的shell命令还是外部命令。

2) Which of the following commands are built-in shell commands in the Linux operating system?

  1. pwd

  2. cd

  3. export

  4. echo

Options:

  1. A and B

  2. C and D

  3. A, B, and C

  4. A, B, C, and D

Answer & Explanation

Correct answer: 4
A, B, C, and D

All given commands are built-in shell commands.

2)以下哪些命令是Linux操作系统中的内置shell命令?

  1. 密码

  2. 光盘

  3. 出口

  4. 回声

选项:

  1. A和B

  2. C和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:4
A,B,C和D

所有给定的命令都是内置的shell命令。

3) Which of the following commands are external commands in the Linux operating system?

  1. cat

  2. file

  3. help

  4. man

Options:

  1. A and B

  2. C and D

  3. A, B, and D

  4. A, B, C, and D

Answer & Explanation

Correct answer: 3
A, B, and D

The cat, file, and man are external commands used in the Linux operating system.

3)以下哪些命令是Linux操作系统中的外部命令?

  1. 文件

  2. 救命

  3. 男子

选项:

  1. A和B

  2. C和D

  3. A,B和D

  4. A,B,C和D

答案与解释

正确答案:3
A,B和D

cat , file和man是Linux操作系统中使用的外部命令。

4) Which of the following command is used to display the path of a command in the Linux File System?

  1. pcmd

  2. which

  3. pathcmd

  4. None of the above

Answer & Explanation

Correct answer: 2
which

The which command is used to display the path of a command in the Linux File System.

4)以下哪个命令用于显示Linux文件系统中命令的路径?

  1. pcmd

  2. 哪一个

  3. 路径

  4. 以上都不是

答案与解释

正确答案:2
哪一个

which命令用于显示Linux文件系统中命令的路径。

5) Which of the following command is used to assign a new name to the Linux built commands?

  1. newcmd

  2. new

  3. alias

  4. aliasname

Answer & Explanation

Correct answer: 3
alias

The alias command is used to assign a new name to the Linux built commands?

5)以下哪个命令用于为Linux内置命令分配新名称?

  1. 新命令

  2. 别名

  3. 别名

答案与解释

正确答案:3
别名

alias命令用于为Linux内置命令分配新名称?

6) Which of the following command is used to enable the shell expansion?

  1. shell +x

  2. shell -x

  3. set -x

  4. set +

Answer & Explanation

Correct answer: 3
set -x

The set –x command is used to enable the shell expansion.

6)以下哪个命令用于启用Shell扩展?

  1. 壳+ x

  2. 壳-x

  3. 设置-x

  4. 设置+

答案与解释

正确答案:3
设置-x

set –x命令用于启用外壳扩展。

7) Which of the following operator is used to execute multiple commands in a single line?

  1. ;

  2. %

  3. &&

  4. ||

Answer & Explanation

Correct answer: 1
;

The semicolon (;) operator is used to executing multiple commands in a single line.

7)以下哪个运算符用于在一行中执行多个命令?

  1. ;

  2. &&

  3. ||

答案与解释

正确答案:1
;

分号(;)运算符用于在一行中执行多个命令。

8) Which of the following command is used to remove an existing alias?

  1. rmalias

  2. unalias

  3. delalias

  4. ralials

Answer & Explanation

Correct answer: 2
unalias

The unalias command is used to remove an existing alias.

8)以下哪个命令用于删除现有别名?

  1. rmalias

  2. 无别名

  3. 德拉利亚斯

  4. 集会

答案与解释

正确答案:2
无别名

unalias命令用于删除现有别名。

9) Which of the following operator is used to comment lines in a shell script file?

  1. //

  2. \\

  3. /**/

  4. #

Answer & Explanation

Correct answer: 4
#

The # operator is used to comment line in a shell script file.

9)以下哪个运算符用于注释Shell脚本文件中的行?

  1. //

  2. \\

  3. / ** /

答案与解释

正确答案:4

#运算符用于注释shell脚本文件中的行。

10) The alias created by "alias" command can be used after exiting from shell?

  1. Yes

  2. No

Answer & Explanation

Correct answer: 2
No

No, the alias created by the alias command can be used after exiting from shell. We can create permanent alias by storing alias in the bash startup file.

10)“ alias”命令创建的别名可以在退出shell后使用吗?

  1. 没有

答案与解释

正确答案:2
没有

不,从shell退出后,可以使用由alias命令创建的别名 。 我们可以通过将别名存储在bash启动文件中来创建永久别名。

11) Which of the following operator is used to store the exit code of a previous command?

  1. $?

  2. %$

  3. ?&

  4. [email protected]

Answer & Explanation

Correct answer: 1
$?

The dollar question mark ($?) is used to store the exit code of a previous command.

11)以下哪个运算符用于存储前一个命令的退出代码?

  1. $?

  2. %$

  3. ?&

  4. [电子邮件保护]

答案与解释

正确答案:1
$?

美元问号( $? )用于存储上一个命令的退出代码。

12) There are the following statements that are given below, which of them are correct about Globbing?

  1. The Globbing is used to recognize the wildcard characters and then expand them into path-name.

  2. The Globbing is also known as path-name expansion.

  3. The File Globbing is not supported by the Linux operating system.

  4. All the above

Options:

  1. A and B

  2. A and C

  3. A, B, and C

  4. D

Answer & Explanation

Correct answer: 1
A and B

Statements A and B are correct about GLobbing in the Linux operating system.

12)下面给出了以下陈述,其中哪些关于Globbing是正确的?

  1. Globbing用于识别通配符,然后将其扩展为路径名。

  2. Globbing也称为路径名扩展。

  3. Linux操作系统不支持File Globbing。

  4. 以上全部

选项:

  1. A和B

  2. A和C

  3. A,B和C

  4. d

答案与解释

正确答案:1
A和B

语句A和B关于Linux操作系统中的GLobbing是正确的。

13) There are the following statements that are given below, which of them are correct about Wildcards in the Linux operating system?

  1. Wildcards are the string patterns that contain some special characters.

  2. Wildcards are used to perform actions on one or more file that uses the same pattern.

  3. Linux shell used wildcard characters for globbing.

  4. All the above

Options:

  1. A and B

  2. A and C

  3. A, B, and C

  4. D

Answer & Explanation

Correct answer: 4
D

All given statements are correct about Wildcards in the Linux operating system.

13)下面给出了以下语句,其中哪些对于Linux操作系统中的通配符是正确的?

  1. 通配符是包含一些特殊字符的字符串模式。

  2. 通配符用于对使用相同模式的一个或多个文件执行操作。

  3. Linux shell使用通配符来进行通配。

  4. 以上全部

选项:

  1. A和B

  2. A和C

  3. A,B和C

  4. d

答案与解释

正确答案:4
d

所有给定的语句对于Linux操作系统中的通配符都是正确的。

14) Which of the following characters are used for wildcards in the Linux operating system?

  1. ?

  2. *

  3. []

  4. <>

Options:

  1. A and B

  2. A and C

  3. A, B, and C

  4. D

Answer & Explanation

Correct answer: 3
A, B, and C

In the Linux, Question mark ?, asterisk *, and square brackets [] are used as wildcard characters.

14)以下哪些字符在Linux操作系统中用于通配符?

  1. *

  2. []

  3. <>

选项:

  1. A和B

  2. A和C

  3. A,B和C

  4. d

答案与解释

正确答案:3
A,B和C

在Linux中,问号? ,星号*和方括号[]用作通配符。

15) Which of the following command is used to display the last executed commands list?

  1. lastcmd

  2. last

  3. history

  4. chistory

Answer & Explanation

Correct answer: 3
history

The history command is used to display the last executed commands list.

15)以下哪个命令用于显示最后执行的命令列表?

  1. lastcmd

  2. 持续

  3. 历史

  4. 情欲

答案与解释

正确答案:3
历史

历史命令用于显示最后执行的命令列表。

16) Which of the following environment variable is used to specify the number of commands history in the current environment?

  1. $HISTSIZE

  2. $HISSIZE

  3. $HISTORYSIZE

  4. $HSIZE

Answer & Explanation

Correct answer: 1
$HISTSIZE

The $HISTSIZE environment variable is used to specify the number of commands history in the current environment. It can also modify according to our requirements.

16)以下哪个环境变量用于指定当前环境中的命令历史记录数?

  1. $ HISTSIZE

  2. $ HISSIZE

  3. $ HISTORYSIZE

  4. $ HSIZE

答案与解释

正确答案:1
$ HISTSIZE

$ HISTSIZE环境变量用于指定当前环境中的命令历史记录数。 也可以根据我们的要求进行修改。

17) Which of the following command is known as "bang bang" in the Linux operating system?

  1. ##

  2. $$

  3. !!

  4. @@

Answer & Explanation

Correct answer: 3
!!

The double exclamation (!!) is known as "bang bang" in the Linux operating system.

17)以下哪个命令在Linux操作系统中被称为“ bang bang”?

  1. ##

  2. $$

  3. !!

  4. @@

答案与解释

正确答案:3
!!

双重感叹号( !! )在Linux操作系统中被称为“ bang bang”。

18) There are the following statements that are given below, which of them are correct about "bang bang" command in the Linux operating system?

  1. The "bang bang" command is used to remove commands history.

  2. The "bang bang" command is used to remove execute last executed command.

  3. The "bang bang" command is used to display the last login time of the current user.

  4. None of the above

Answer & Explanation

Correct answer: 2
The "bang bang" command is used to remove execute last executed command.

The "bang bang" command is used to remove execute last executed command.

18)下面给出了以下语句,其中哪些对于Linux操作系统中的“ bang bang”命令是正确的?

  1. “ bang bang”命令用于删除命令历史记录。

  2. “ bang bang”命令用于删除执行最后执行的命令。

  3. “ bang bang”命令用于显示当前用户的最后登录时间。

  4. 以上都不是

答案与解释

正确答案:2
“ bang bang”命令用于删除执行最后执行的命令。

“ bang bang”命令用于删除执行最后执行的命令。

19) Which command is used to execute a command based on the number assigned in the command history, here we denote command history number by N?

  1. !N

  2. #N

  3. $N

  4. !!N

Answer & Explanation

Correct answer: 1
!N

The single exclamation is used with history numbers to execute the specific command from history.

19)根据命令历史记录中分配的编号,使用哪个命令执行命令,此处用N表示命令历史记录编号?

  1. !N

  2. #N

  3. $ N

  4. !! N

答案与解释

正确答案:1
!N

单个感叹号与历史记录编号一起使用以执行历史记录中的特定命令。

20) Can we embed the new shell on the command line?

  1. Yes

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, we can embed the new shell on the command line.

20)我们可以在命令行中嵌入新的shell吗?

  1. 没有

答案与解释

正确答案:1

是的,我们可以在命令行中嵌入新的shell。

翻译自: https://www.includehelp.com/linux/shell-commands-aptitude-questions-and-answers.aspx

Linux Shell命令能力倾向问题和解答相关推荐

  1. Linux shell命令总结

    01 前言 Linux shell命令应该算是非常入门的东西,但是实际上在使用的时候,会遇到各种各样的问题,前几天我在我们的项目上需要做一个功能,根据进程名字杀死这个进程,下面是过程 1.我们正常需要 ...

  2. 8则实用的Linux Shell命令

    8则实用的Linux Shell命令 1 为 man 手册创建 pdf 版本 man -t manpage | ps2pdf - filename.pdf 比如制作 ls 命令的 man 手册 pdf ...

  3. 37条常用Linux Shell命令组合

    2019独角兽企业重金招聘Python工程师标准>>> 37条常用Linux Shell命令组合,推荐个各位网友,老手和新手们都值得收集和总结的东西.一起来看看 序号 任务 命令组合 ...

  4. linux help命令编写,Linux shell命令帮助格式详解

    前言 linux shell命令通常可以通过-h或--help来打印帮助说明,或者通过man命令来查看帮助,有时候我们也会给自己的程序写简单的帮助说明,其实帮助说明格式是有规律可循的 帮助示例 下面是 ...

  5. python commands执行不连续_[Python] 利用commands模块执行Linux shell命令

    用Python写运维脚本时,经常需要执行linux shell的命令,Python中的commands模块专门用于调用Linux shell命令,并返回状态和结果,下面是commands模块的3个主要 ...

  6. python commands用法_python之commands模块(执行Linux Shell命令)

    commands模块 用于执行Linux shell命令,要获得shell命令的输出只需要在后面参数写入('命令')就可以了. 需要得到命令执行的状态则需要判断$?的值, 在Python中有一个模块c ...

  7. 每日一条Linux Shell命令--mv

    每日一条Linux Shell命令--mv mv(move) 基本使用方法 常用参数 常见应用场景 对应的windows batch命令 mv(move) mv [options] source de ...

  8. linux 脚本编写基本命令,Linux Shell命令行及脚本编程实例详解

    <Linux典藏大系:Linux Shell命令行及脚本编程实例详解>共15章,分为两篇.主要内容包括:Linux 及Linux Shell简介.初识Linux Shell.常用Shell ...

  9. java 利用ganymed-ssh2 远程执行linux shell 命令

    早期的ganymed-ssh2包也可以实现远程调研linux shell 命令,但是这个包最新版本是2014年之后,就没有更新了,发现linux 操作系统安装 open-ssh 8.5及更高级版本,就 ...

最新文章

  1. PAT (Advanced Level) 1078. Hashing (25)
  2. 网站集成支付宝的方法和所需资料下载
  3. python题目及解析_python知识点总结以及15道题的解析
  4. Python: tkinter实例改名小工具
  5. mysql安装10045_mysql数据库5.6.45安装后的配置(离线安装包版)
  6. java学习(17):巩固练习
  7. sass 安装和使用
  8. 二叉树前序、中序、后序遍历非递归写法的透彻解析
  9. mysql8.0.13 rpm_Centos7 安装mysql 8.0.13(rpm)的教程详解
  10. 《 Ray Tracing from the Ground Up》官方代码的潜在的纹理映射问题
  11. python urlopen错误_urlopen()出错
  12. linux命令ps -aux|grep xxx详解
  13. android 更换系统壁纸,Android使用线程更换壁纸
  14. 代码比对工具-Diffmerge
  15. 【实战经验总结】如何撰写标书
  16. 转:SQL Server 2005“错误1706。安装程序找不到需要的文件。
  17. 投资理财之基金四:指数基金
  18. 怎么进入计算机开发doc界面,电脑怎么进入dos界面(电脑进入dos界面操作方法)...
  19. 免费开通量化软件恒生ptrade和讯投qmt
  20. matlab曼德勃罗集,YaK与您一起欣赏BBC纪录片:''''神秘的混沌理论''''

热门文章

  1. c iostream.源码_通达信指标公式源码精准买卖主图指标公式免费分享
  2. mmdetection 使用笔记 01: 安装与简单的推理demo
  3. java 排序原理_简单选择排序算法原理及java实现(超详细)
  4. jspdf html转换pdf,使用jspdf将HTML转换为pdf时出错
  5. 时钟php,php+js液晶时钟
  6. 线性分组码的最小汉明距为6_第二章 线性代数
  7. oracle中修改process
  8. MySQL Cluster 群集安装环境介绍
  9. go反射机制与类型识别
  10. 国内远程医疗市场快速增长