29.9. Klish - Kommand Line Interface Shell (the fork of clish project)

简介:

http://code.google.com/p/klish/

Klish是一个命令行补全工具,可以实现类似于CISCO路由器的命令行帮助界面。它是Clish的后续版本,Klish有一个特殊的功能,可以让用户仅使用指定目录中的命令。

29.9.1. 安装Klish

# cd /usr/local/src/
# wget http://klish.googlecode.com/files/klish-1.6.4.tar.bz2
# tar jxvf klish-1.6.4.tar.bz2
# cd klish-1.6.4/
# ./configure --prefix=/srv/klish-1.6.4
# make
# make install

# cp -r xml-examples /srv/klish-1.6.4/
# export CLISH_PATH=/srv/klish-1.6.4/xml-examples/clish
		

启动clish

		
# /srv/klish-1.6.4/bin/clish

********************************************
*         CLISH (see-lish)                 *
*                                          *
*      WARNING: Authorised Access Only     *
********************************************

Welcome root it is Mon Feb 18 09:59:06 CST 2013
>
		
		

29.9.2. 为用户指定clish作为默认Shell

# vim /etc/passwd
neo:x:1000:1000:neo,,,:/home/neo:/bin/bash
		

改为

neo:x:1000:1000:neo,,,:/home/neo:/srv/klish-1.6.4/bin/clish
		

29.9.3. FAQ

29.9.3.1. clish/shell/shell_expat.c:36:19: fatal error: expat.h: No such file or directory

clish/shell/shell_expat.c:36:19: fatal error: expat.h: No such file or directory
compilation terminated.
make[1]: *** [clish/shell/libclish_la-shell_expat.lo] Error 1
make[1]: Leaving directory `/usr/local/src/klish-1.6.4'
make: *** [all] Error 2
			

解决方案,安装expat开发包

# apt-get install libexpat1-dev
			




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
4月前
|
Unix Docker 容器
使用docker 启动naocs 报错出现:standard_init_linux.go:241: exec user process caused "exec format error"
```markdown Error in Docker container startup: "standard_init_linux.go:241: exec user process caused \"exec format error\"". Occurred at 2024-06-29 09:26:19.910, followed by a failed hook with a syslog delivery error at 09:27:20.193. Seeking solutions from experts. ```
|
5月前
|
Shell 开发工具 Android开发
详解sh ndk-build.cmd command not found
【4月更文挑战第2天】
|
Java
IDEA 启动服务报错:Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun 解决方案
IDEA 启动服务报错:Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun 解决方案
1947 1
|
Linux Shell Windows
Shell - line 2: $‘\r‘: command not found
拷贝脚本提交后报错 line 2: $'\r': command not found,但是这是别的同学可以运行后发给我的,随后开始排查。安装 dos2unix 需要使用 yum。安装 yum 需要使用 brew。
481 0
Shell - line 2: $‘\r‘: command not found
|
XML IDE Java
IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...(下)
IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...(下)
IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...(下)
|
Java 应用服务中间件 开发工具
IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...(上)
IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...(上)
IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...(上)