在.profile中的ubuntu中创建别名 [英] creating an alias in ubuntu , in .profile

查看:108
本文介绍了在.profile中的ubuntu中创建别名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道为什么这个简单的别名不起作用.我已经在线阅读了有关创建它的示例,但不知道我要去哪里错了...

I can't figure out why this simple alias isn't work. I've read online an example on creating it and don't know where I'm going wrong...

我在底部的.profile文件中添加了以下内容:

I've added the following to my .profile file at the bottom:

alias profile='sudo nano ~/.profile'

当我在终端中输入配置文件"时,它说找不到命令...

When I type in 'profile' in the terminal it says command not found...

我觉得这是我正在做的非常非常简单的错误.

I have a feeling this is a very very simple error I'm making.

谢谢大家!

推荐答案

如果您注销并重新登录会发生什么?

What happens if you log out and back in?

或者,您可以直接输入

source .profile

,这应该激活您的别名.许多使用bash的人都在.bashrc文件中设置了别名.

and that should activate your alias. Many people using bash set their aliases up in the .bashrc file.

这篇关于在.profile中的ubuntu中创建别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆