网站首页 > linux / 正文
以创建ll命令为例
步骤:
1、在/home目录用户文件夹下打开.profile文件
vim ~/.profile
ubuntu系统是~/.profile, centos系统用 ~/.bashrc
2、在.profile文件中写入
语法: alias[别名]=[指令名称]
alias ll="ls -alh"
3、 然后执行
source ~/.profile
若系统启动时不会自动加载 ~/.profile 文件,则将 source ~/.profile 命令添加到要自动加载的文件中即可,如~/.bash.profile 文件
source ~/.profile
Tags:linux创建用户命令
猜你喜欢
- 2024-11-26 以其他用户的身份执行Linux命令
- 2024-11-26 Linux常用指令简介(1):用户和权限管理
- 2024-11-26 Linux记录用户操作命令
- 2024-11-26 Linux开机自启动程序配置,适用于webman命令行启动的程序
- 2024-11-26 Linux建立软/硬链接文件(ln命令)
- 2024-11-26 Linux基础之创建运行脚本
- 2024-11-26 Linux系统如何设置开机自动运行脚本?
- 2024-11-26 Linux创建新用户并使用证书远程登录
- 2024-11-26 linux批量添加用户
- 2024-11-26 每日一个Linux命令解析——newusers