為什麼系統命令不能簡單些
Tofloor
poster avatar
nero28
deepin
2016-03-19 01:49
Author
為什麼系統命令不能簡單些?比如更新只需要輸入update 或update system,安裝就install +安裝包名,不要綴,系統自己補全.要提權輸入密碼,直接提示要輸入密碼,直接一點不是好?為啥需打一長串,當然,很多人會說可以用別名功能,這不多走了一段路嗎?

突發奇想哈.
Reply Favorite View the author
All Replies
2 / 2
To page
avatar
136******54
deepin
2016-03-20 18:27
#21
https://bbs.deepin.org/post/38182
alias是图形工具吗?

商店中有售的吗?

默认就有,alias的功能就是把一条命令设置成你自己习惯的名字
Reply View the author
avatar
ArthurDeepin
deepin
2016-03-20 19:10
#22
https://bbs.deepin.org/post/38182
alias是图形工具吗?

商店中有售的吗?

只是bash的内建的功能
  1. $ type alias
  2. alias 是 shell 内建
Copy the Code


要每次都默认生效,需要预先写到bash的配置文件里 ~/.bashrc
Reply View the author
Comments
ahyanglf
2016-03-21 00:56
能举个例子吗?
avatar
nero28
deepin
2016-03-20 19:25
#23
wonchong 发表于 2016-3-20 04:51
很简单 一条命令足以 :sudo rm -rf ./*

你先试给我看,我才敢用啊
Reply View the author
avatar
ahyanglf
deepin
2016-03-21 00:55
#24
https://bbs.deepin.org/post/38182
默认就有,alias的功能就是把一条命令设置成你自己习惯的名字

能具体下如何写个命令啊?举个例子
Reply View the author
avatar
ArthurDeepin
deepin
2016-03-21 00:58
#25
https://bbs.deepin.org/post/38182
能具体下如何写个命令啊?举个例子

直接把我上面写的几句(最后一句除外)贴到~/.bashrc 里,然后打开终端试试。

.bashrc 应该已经有了发行版自己预定的几条了,在里面看看
Reply View the author
avatar
182******97
deepin
2016-03-21 08:58
#26
https://bbs.deepin.org/post/38182
你先试给我看,我才敢用啊

没事 也就是把linux系统删了 然后你可以进win
Reply View the author
avatar
mamy920
deepin
2016-03-21 17:05
#27
https://bbs.deepin.org/post/38182
常用的长命令,使用alias设定别名。

alias u="sudo apt-get update"

最后一条命令是个坑啊。。。。。
Reply View the author
2 / 2
To page