shell基本知识

这篇具有很好参考价值的文章主要介绍了shell基本知识。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

一、为什么学习和使用shell编程

shell基本知识,linux,shell

二、什么是shell

shell基本知识,linux,shell

shell基本知识,linux,shell

系统当前支持的所有的shell:

shell基本知识,linux,shell

三、shell的分类

shell基本知识,linux,shell

shell基本知识,linux,shell

为nologin,运行进程的,不允许登录系统,考虑系统安全性

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

用户名:密码的占位符:uid(用户的id):gid(用户所属基本组的id:关于账号的描述信息:用户家目录:当前用户与系统交互用的shell

本来是bash

shell基本知识,linux,shell

修改root的shell为sh

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

环境变量:

shell基本知识,linux,shell

shell基本知识,linux,shell

当前用户输入的命令会在这些路径去找它的可执行文件

shell基本知识,linux,shell

比如输入ls,会在上述路径依次寻找,如果都找不到,会输出command not found…

打印当前用户的家目录:

shell基本知识,linux,shell

打印当前用户:

shell基本知识,linux,shell

打印当前用户的id:

shell基本知识,linux,shell

四、作为程序设计的语言——shell

shell基本知识,linux,shell

五、如何学好shell

shell基本知识,linux,shell

shell基本知识,linux,shell

六、shell脚本的书写规范

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

七、shell脚本的执行方式

1、交互式执行

shell基本知识,linux,shell

shell基本知识,linux,shell

2、作为程序文件执行(常用)

shell基本知识,linux,shell

shell基本知识,linux,shell

八、执行脚本的方法

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

方法一:

shell基本知识,linux,shell

方法二:

shell基本知识,linux,shell

shell基本知识,linux,shell

方法三:

shell基本知识,linux,shell

方法四:

shell基本知识,linux,shell

查看打开子进程:

shell基本知识,linux,shell

shell基本知识,linux,shell

方法一:

shell基本知识,linux,shell

进入休眠,在另一端执行pstree:有子进程

shell基本知识,linux,shell

shell基本知识,linux,shell

结束之后就没有了

shell基本知识,linux,shell

shell基本知识,linux,shell

方法二:

shell基本知识,linux,shell

执行pstree:有子进程

shell基本知识,linux,shell

方法三:

shell基本知识,linux,shell

执行pstree:没有子进程

shell基本知识,linux,shell

方法四:

shell基本知识,linux,shell

执行pstree:没有子进程

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

方法一:

shell基本知识,linux,shell

方法二:

shell基本知识,linux,shell

方法三:

shell基本知识,linux,shell

方法四:

shell基本知识,linux,shell

shell基本知识,linux,shell

+号表示进去直接跳到行尾,不加+在行首

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

方法一:

在子进程里面,userdir这个变量有值为pwd指令的输出,在当前进程没有值为空

shell基本知识,linux,shell

方法二:

当前进程也没有值

shell基本知识,linux,shell

方法三:

shell基本知识,linux,shell

方法四:和方法三一样

九、shell脚本的退出状态码

shell基本知识,linux,shell

命令执行成功后会有状态码:

shell基本知识,linux,shell

shell脚本也有状态码

取决于最后一条指令

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell

shell基本知识,linux,shell文章来源地址https://www.toymoban.com/news/detail-664040.html

到了这里,关于shell基本知识的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Linux的基本指令和权限的知识

    学前的建议: 大家不要太关注指令是啥,记不住怎么办(没事,想用时去查就好了),这篇文章重点部分是围绕指令的周边知识。毕竟指令是“死肌肉”,而一些关于Linux和操作系统的 理论知识才是最重要滴!!! 加红的选项, 需要多练,在日常使用频繁!!! 目录 1. L

    2024年02月04日
    浏览(28)
  • 【Linux系列P2】Linux基本指令&知识(带图演示,精炼)

    前言 大家好吖,欢迎来到 YY 滴 Linux系列 ,热烈欢迎! 本章主要内容面向接触过Linux的老铁,主要内容含 欢迎订阅 YY 滴Linux专栏!更多干货持续更新!以下是传送门! 订阅专栏阅读: YY的 《Linux》系列 ❀❀❀❀❀ 【Linux系列-P1】 Linux环境的搭建 【Linux系列-P2】Linux的基本知

    2024年02月06日
    浏览(31)
  • 【探索Linux】P.25(网络编程套接字基本概念 —— 预备知识)

    在上一篇文章中,我们深入探讨了Linux网络的基础知识和它的发展历史,为读者揭开了Linux网络技术演变的序幕。我们了解到,Linux网络技术的发展不仅促进了操作系统本身的成熟,还对整个互联网的进步产生了深远的影响。随着网络技术的不断进步,Linux系统在网络通信方面

    2024年04月27日
    浏览(33)
  • 探索Linux世界:基本指令(文件查看、时间相关、grep、打包压缩及相关知识)

    今天继续介绍一些指令 语法 :cat [选项] [文件] 功能 : 查看目标文件的内容 -b 对非空输出行编号 -n 对输出的所有行编号 -s 不输出多行空行 示例 : 查看单个文件内容: 显示文件内容并附带行号: 创建新文件并写入内容: 追加内容到文件末尾: 和 我们下面就会细讲啦,大

    2024年03月14日
    浏览(38)
  • Web数据库基本知识,SQL基本语法

    当我们谈论整个技术栈时,实际上涉及了一系列步骤,而在Web开发中,这些步骤可以被具体化为以下几个阶段: DBMS-GUI-翻译器-查询语言 在web中具体如下: postgreSQL-Hasura-Apollo+ts-GraphQL 具体解释 DBMS(数据库管理系统): 作用: 数据库管理系统允许我们直接使用SQL语言来操作数

    2024年02月03日
    浏览(38)
  • 电容的基本知识

    1、电容是电路中重要的元件,种类多、用途广,主要有插件类和贴片类两种。 2、电容主要特性参数:标称容量、耐压、误差、温度         2.1电容容量常用单位有微法《uF)、纳法《nF)、皮法《pF)        单位换算:1uF=10^3nF=10\\\"6pF《电容的基本单位用法拉(F)表示)例如: 105

    2024年02月11日
    浏览(41)
  • python基本知识学习

    在控制台输出Hello,World! 单行注释:以#开头 多行注释: 选中要注释的代码Ctrl+/ 三单引号 三双引号 第一个字符必须是字母表中字母或下划线 _ 。 标识符的其他的部分由字母、数字和下划线组成。 标识符对大小写敏感。 标识符也叫变量名,变量名就是一个变量的名字,例如

    2024年02月15日
    浏览(39)
  • 无人机基本知识

    目录 前言 一、总体概况 二、机身 三、涵道 四、动力系统 1、 螺旋桨  2、电机 3、电调 4、电池 五、遥控器 六、自动驾驶仪(飞控) 1、组成 (1)传感器 (2)接口 2、飞控的连接 3、控制逻辑 4、作用 5、产品 七、地面站 八、数传 九、深度相机 总结 参考文献 四旋翼飞机

    2024年01月19日
    浏览(32)
  • 【多线程】| 基本知识汇总

    线程(Thread)是 操作系统能够进行运算调度的最小单位 。它被包含在进程之中,是进程中的实际运作单位。 在一个进程内部,要同时干多件事,就需要同时运行多个“子任务”,我们把进程内的这些“子任务”称为线程(Thread) 当Java程序启动时,一个线程会立刻运行,该

    2024年02月06日
    浏览(44)
  • CSS基本知识

    CSS叫做层叠样式表。CSS 能够对网页中元素位置的排版进行像素级精确控制, 实现美化页面的效果。能够做到页面的样式和结构分离。 举个例子: 这里的style标签我们一般设置在head标签里。 可以看出被选择器修饰的和没被修饰的不同。 写在 style 标签中,嵌入到 html 内部,理

    2024年01月24日
    浏览(39)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包