博客
关于我
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/

你可能感兴趣的文章
Nginx学习总结(13)——Nginx 重要知识点回顾
查看>>
Nginx学习总结(14)——Nginx配置参数详细说明与整理
查看>>
nginx学习笔记002---Nginx代理配置_案例1_实现了对前端代码的方向代理_并且配置了后端api接口的访问地址
查看>>
Nginx安装与常见命令
查看>>
Nginx安装及配置详解
查看>>
nginx安装配置
查看>>
Nginx实战经验分享:从小白到专家的成长历程!
查看>>
Nginx实现反向代理负载均衡
查看>>
nginx实现负载均衡
查看>>
nginx常用命令及简单配置
查看>>
nginx开机启动脚本
查看>>
nginx异常:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf
查看>>
nginx总结及使用Docker创建nginx教程
查看>>
nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:128
查看>>
nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in usrlocalnginxconfnginx.conf128
查看>>
nginx日志分割并定期删除
查看>>
Nginx日志分析系统---ElasticStack(ELK)工作笔记001
查看>>
Nginx映射本地json文件,配置解决浏览器跨域问题,提供前端get请求模拟数据
查看>>
nginx最最最详细教程来了
查看>>
Nginx服务器---正向代理
查看>>