您的位置:首页 > 运维架构 > Shell

linux查看当前使用的shell,修改shell,shell编程?

2010-11-20 20:45 495 查看
[root@localhost ~]# ls -l /bin/*sh

-rwxr-xr-x 1 root root 735004 2009-01-22 /bin/bash

lrwxrwxrwx 1 root root      4 08-31 13:44 /bin/csh -> tcsh

lrwxrwxrwx 1 root root     21 08-31 13:45 /bin/ksh -> /etc/alternatives/ksh

lrwxrwxrwx 1 root root      4 08-31 13:42 /bin/sh -> bash

-rwxr-xr-x 1 root root 346628 2010-03-31 /bin/tcsh

目前,我们常用的是bash

如何修改自己需要用到的解释shell呢??

chsh -s /bin/csh

[root@localhost eclipse]# chsh -s /bin/csh

Changing shell for root.

Shell changed.

如何查看目前使用的所哪种shell??env显示当前操作系统的环境变量。

[root@localhost ~]# env

SSH_AGENT_PID=2815

HOSTNAME=localhost.localdomain

DESKTOP_STARTUP_ID=

TERM=xterm

SHELL=/bin/bash

HISTSIZE=1000

KDE_NO_IPV6=1........

shell编程??就是利用shell的常用命令,写成类似于windows下的批处理文件。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息