首页
学习
活动
专区
圈层
工具
发布

linux基础命令1

查看当前设备终端

# tty

/dev/pts/0

显示当前使用的shell

# echo ${SHELL}

/bin/bash

显示当前使用所使用的所有shell

# cat /etc/shells

/bin/sh

/bin/bash

/sbin/nologin

/bin/dash

/bin/tcsh

/bin/csh

查看命令

# which ls

alias ls='ls --color=auto'

/bin/ls

查看命令是内部还是外部命令

# type ls

ls is aliased to `ls --color=auto'

# type cat

cat is hashed (/bin/cat)

查看命令位置

# whereis ls

ls: /bin/ls /usr/share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.gz

查看命令man文件

#whatis ls

ls (1) - list directory contents

ls (1p) - list directory contents

# man 1p ls

# man 1 ls

举报
领券