Debian sudo自动补全
解决 debian sudo TAB 键不能自动补全命令的原因
一般情况,命令行输入 sudo apt-get ins 按 tab ,它后面会自动补全为 install 如果右面写了包的名的一部分,按 tab 它也会自动完成或列出候选的,这次parrotOS(基于debian)突然不好使了
首先确认是否安装了 自动补全的插件,输入
apt-get install bash-completion
然后在/etc/bash.bashrc :
即 在 .bash_profile 里加
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
就 ok 了
链接:http://gumelta.com/add-bash-completion-in-debian.php
完整 copy 下来吧:
Add Bash Completion In Debian
ash completion is a useful tool for completion of file paths, commands etc. By default it is enabled on Ubuntu but not on Debian. With two simple steps it can also be enabled on Debian.
- Install bash-completion
First of all we need the install the according package:
apt-get install bash-completion - Add it to the bash profile
Either edit the ~/.bash_profile file to enable it only for a given user or edit /etc/profile to add it system-wide. Add the following code:
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi - Try it
In order for it to work you have to log out and relogin and then you can make use of bash completion the usual way. E.g. issue:
apt-g
and then press the TAB key once and the command will be completed to apt-get. Or issue this:
apt
and then press TAB key twice. You can also try with
apt-get install apa
and then press TAB key once to complete as far as possible and a second time to list all options.
Debian sudo自动补全的更多相关文章
- sudo和man的tab自动补全
要加入sudo和man的tab自动补全功能,只需在~/.bashrc中加入: #Enabling tab-completioncomplete -cf sudocomplete -cf man
- mycli---数据库工具(提示、自动补全)
前言 朋友介绍了一个工具,mycli,支持MySQL查询语句自动补全等,这里给大家介绍一下. 大家也可以直接去官网看一下,安装使用都很简单. 安装 $ pip install -U mycli $ b ...
- MyCLI :一个支持自动补全和语法高亮的 MySQL/MariaDB 客户端
MyCLI 是一个易于使用的命令行客户端,可用于受欢迎的数据库管理系统 MySQL.MariaDB 和 Percona,支持自动补全和语法高亮.它是使用 prompt_toolkit 库写的,需要 P ...
- vim自动补全功能
1.首先下载一个插件:ctags 输入:sudo apt-get install ctags 2.Ctrl+n进行单词的自动补全
- Vim自动补全神器–YouCompleteMe
YouCompleteMe的特别之处 基于语义补全 总所周知,Vim是一款文本编辑器.也就是说,其最基础的工作就是编辑文本,而不管该文本的内容是什么.在Vim被程序员所使用后,其慢慢的被肩负了与IDE ...
- vim自动补全插件YouCompleteMe
前言 Valloric/YouCompleteMe可以说是vim安装最复杂的插件之一,但是一旦装好,却又是非常好用的.YouCompleteMe简称ycm 在安装折腾的过程中,我再一次的体会到,除了官 ...
- VIM自动补全插件 - YouCompleteMe--"大神级vim补全插件"
VIM自动补全插件 - YouCompleteMe 序言 vim 之所以被称为编辑器之神多半归功于其丰富的可DIY的灵活插件功能,( 例如vim下的这款神级般的代码补全插件YouCompleteMe) ...
- ipython, 一个 python 的交互式 shell,比默认的python shell 好用得多,支持变量自动补全,自动缩进,支持 bash shell 命令,内置了许多很有用的功能和函数
一个 python 的交互式 shell,比默认的python shell 好用得多,支持变量自动补全,自动缩进,支持 bash shell 命令,内置了许多很有用的功能和函数. 若用的是fish s ...
- Vim自动补全神器:YouCompleteMe
第一次听说这个插件还是在偶然的情况下看到别人的博客,听说了这个插件的大名.本来打算在实训期间来完成安装的,无奈网实在不给力,也就拖到了回家的时候.在开始准备工作的时候就了解到这个插件不是很容易安装,安 ...
随机推荐
- LeetCode 206. Reverse Linked List(C++)
题目: Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4 ...
- 王者荣耀交流协会final冲刺第五次scrum会议
成员王超,高远博,冉华,王磊,王玉玲,任思佳,袁玥全部到齐,王磊拍照. master:高远博 2.时间跨度 2017年12月5日 18:00 - 18:31,总计31分钟 3.地点 一食堂二楼沙发座椅 ...
- winform界面之固定大小随dpi
场景: 已经更改成大小可随dpi改变,可是在用applyresoures()之后(添加更改语言功能),发现控件大小失真. 分析:applyresoures()是把该控件的属性改为程序设计的固定大小,不 ...
- OA--对于每个form表单(<s:iterator>生成)的处理
由于是后台传过来的,我们不知道form 有几个 也不能指定form的id和name,(其实也可以就是可能会冲突我们还是用下面讲的方法把) 之前有想过 对于每个form 里面都有一些参数,举个例子 项目 ...
- HDU 5234 Happy birthday 01背包
题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5234 bc:http://bestcoder.hdu.edu.cn/contests/con ...
- windows+ubuntu时间修改问题
只需要在ubuntu系统数输入一行指令即可 timedatectl set-local-rtc 1 --adjust-system-clock
- Java中的网络编程-1
计算机网络:将分布在不同地区的计算机与专门的外部设备用通信线路互连成一个规模大.功能强的网络系统, 从而使众多计算机 可以方便的互相传递信息, 共享硬件.软件.数据信息等资源. 计算机网络的主要功能: ...
- jQuery的2把利器
<!-- $是一个函数,首先是给window添加$,然后该值是一个函数,函数返回的值是对象.1. jQuery核心函数 * 简称: jQuery函数($/jQuery) * jQuery库向外直 ...
- SpringCloud——服务网关
1.背景 上篇博客<SpringCloud--Eureka服务注册和发现>中介绍了注册中心Eureka.服务提供者和服务消费者.这篇博客我们将介绍服务网关. 图(1) 未使用服务网关的做法 ...
- sleep() 与 wait()的比较
1.这两个方法来自不同的类分别是,sleep来自Thread类,和wait来自Object类. sleep是Thread的静态类方法,谁调用的谁去睡觉,即使在a线程里调用了b的sleep方法,实际上还 ...