博客
关于我
linux添加自定义的命令!
阅读量:805 次
发布时间:2023-02-04

本文共 468 字,大约阅读时间需要 1 分钟。

修改了 /root 下的 .bashrc

/etc/ 下的 bashrc 配置中,文末尾增加了以下内容:

if [ -f bash_aliases ]; then      . /etc/bash_aliases;      echo "1111111 aasb";  fi

此外,还可以尝试修改 /etc/profile 文件。

通过执行 source bashrc. 命令(会有 echo 信息输出),可以在当前 Shell 环境中生效。然而,这种方法仅适用于当前 Shell 窗口,新开的 Shell 窗口则不受影响。

因此,建议将配置脚本添加到 /etc/profile.d/ 目录中。这样,每次新开 Shell 窗口时,都会自动加载配置文件并输出 echo 信息。

注意事项:如果你在 /root 根目录下修改了 .bashrc,可能会导致系统默认 Shell 环境配置不生效。

参考文章(此链接已去除):http://blog.cdn.net/chenchong08/article/details/7833242

转载地址:http://sskfk.baihongyu.com/

你可能感兴趣的文章
NFV商用可行新华三vBRAS方案实践验证
查看>>
ng build --aot --prod生成文件报错
查看>>
ng 指令的自定义、使用
查看>>
nghttp3使用指南
查看>>
Nginx
查看>>
nginx + etcd 动态负载均衡实践(三)—— 基于nginx-upsync-module实现
查看>>
nginx + etcd 动态负载均衡实践(二)—— 组件安装
查看>>
nginx + etcd 动态负载均衡实践(四)—— 基于confd实现
查看>>
Nginx + Spring Boot 实现负载均衡
查看>>
Nginx + uWSGI + Flask + Vhost
查看>>
Nginx - Header详解
查看>>
Nginx - 反向代理、负载均衡、动静分离、底层原理(案例实战分析)
查看>>
nginx 1.24.0 安装nginx最新稳定版
查看>>
nginx 301 永久重定向
查看>>
nginx css,js合并插件,淘宝nginx合并js,css插件
查看>>
Nginx gateway集群和动态网关
查看>>
Nginx Location配置总结
查看>>
Nginx log文件写入失败?log文件权限设置问题
查看>>
Nginx Lua install
查看>>
nginx net::ERR_ABORTED 403 (Forbidden)
查看>>