About Bash
Created|Updated
|Post Views:
Bash的环境变量
- PROMPT_DIRTRIM
修改PS1中dir的个数 trim 留下几层目录
bashrc 检查错误
1 | $ bash -n ~/.bashrc |
Author: wang shaodong
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles
2020-02-19
about-ssh
ssh Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network ssh 也是Linux 命令之一,用于(取代telnet等不安全的协议软件)安全连接访问远程服务器. ssh 基本用法 以root用户通过端口22333登录192.168.23.4主机 1$ ssh root@192.168.23.4:2233 ssh的特殊姿势 只有你拥有台海外vps并且安装了ssh服务,可以通过ssh动态端口转发实现fq ssh [-D [bind_address:]port root@remotehost:2233 一般bind_address 是localhost netstat -nat 查看端口使用情况ssh 相关命令ssh-agent ssh-keygen
2021-08-07
Linux software commonly used
ubuntu 内核调试开发常用软件包名 记录12libncurses5-dev gcc-arm-linux-gnueabi build-essential gcc-5-arm-linux-gnueabi git libssl-dev openssl bc flex bison qemu make gdb gdb-multiarch \device-tree-compiler uml-utilities bridge-utils nfs-kernel-server 1234# openssl's liblibssl-dev# elf's liblibelf-dev 内核启动的三种方式 initrd (init ram disk) init= root
2020-02-14
Linux commands
linux 命令列表 systemctl (Control the systemd system and service manager) systemd 系统用来替代之前的linux 中的system V 目的在于统一系统服务, 并行启动系统服务程序,加快系统启动,大部分现代linux使用此程序引导系统. 常用命令如下 12345# systemctl enable service_name# systemctl start service_name# systemctl status service_name# systemctl restart service_name# systemctl disable service_name pushd popd pushd dir_name 切换目录的同时把当前目录圧入栈,方便后续使用popd 弹出栈切换目录 popd 弹出上一次的目录栈,相当于cd - popd 可以多次使用,直到目录栈为空,cd - 多次使用只会在两个目录之间来回切换 grep 1$ grep ...
2020-01-20
About Linux
Linux 的作用范围 Linux 本来仅仅是指一种类Unix系统(和unix比较像的操作系统称为类Unix系统)的kernel, 不包括 shell等其它实用工具.随着linux的日益壮大或者人们的口口相传,原本应该是GNU/Linux 指代整个操作系统,后来渐渐Linux 也指代整个操作系统. 但是在具体的上下文环境中还是可以分清楚是指代内核还是整个操作系统 Linux 的常见发行版本 首先解释什么是发行版本:发行版本是开源社区或者公司,甚至是个人把Linuxkernel拿过来,整合其它的使用工具,以及软件管理工具装配的一个便于终端用户使用的操作系统根据软件包管理工具的不同大概分为两个系列 :Debian 系列(使用 dpkg 作为底层工具)和 Redhat 系列(使用 rpm 作为底层工具),还有一些特立独行的发行版本使用的是其他的软件包管理工具(比如说 arch,和 gentoo) dpkg 系 Debian Ubuntu Linuxmint Deepin rpm 系 Redhat CentOS Fedora SUSE OpenSUSE pacma...
2020-01-19
About Shell
shell 直译为壳 有个著名的油气公司叫做荷兰皇家壳牌(英語:Royal Dutch Shell Plc)是世界第二大石油公司,公司在英國註冊,总部位于荷兰海牙。外国人什么都叫做壳,蛋壳,地壳,都是shell 有种包裹什么东西在里面的感觉操作系统分为内核和外壳 这个壳叫做shell, shell 用来和内核交流,shell 有CUI(命令行的), GUI (图形化的).unix/linux/freebsd 操作系统上最通用的人机交互界面就是命令行,典型 windows上最常用的是 图形化界面(忘记了一个gui系统的几个基本元素mouse ,window, focus,)下面主要讨论 命令行shell 格式各样的shell 常见的bash,sh, zsh,fish (经常听说 bash 4.xx 有什么命令注入漏洞)ash :bash(Bourne-Again SHell) :比较流行的一个shell基本各大linux发行版本都默认设置bash为shellzsh :号称最后一个shell 因为字母 z是最后一个了。。fish : 灵活的交互式shell, ...
2020-02-18
Linux中的奇葩opensuse
安装完成之后的软件源切换 禁用所有软件源 1$ sudo zypper mr -da 添加阿里镜像源 1234$ sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/distribution/leap/15.1/repo/oss openSUSE-Aliyun-OSS ;$ sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/distribution/leap/15.1/repo/non-oss openSUSE-Aliyun-NON-OSS ;$ sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/update/leap/15.1/oss openSUSE-Aliyun-UPDATE-OSS ;$ sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/update/leap/15.1/non-oss openSUSE-Aliyun-UPDATE-...
Announcement
This is my Blog