执行当前目录下的命令,在命令前加./
ll
-rwxr-xr-x 1 root root 2584728 Sep 1 14:24 redis-cli
-rw-r--r-- 1 root root 46694 Sep 1 14:25 redis.conf
-rwxr-xr-x 1 root root 5181760 Sep 1 14:24 redis-server
[root@xiaoshuo redis]# redis-cli //找不到该命令
-bash: redis-cli: command not found
[root@xiaoshuo redis]# ./redis-cli //执行成功,打开了redis客户端
127.0.0.1:6379>