linux 命令

用户能够运行命令但sudo 命令显示找不到文件

[root@solr3 anaconda3]#sudo jupyterhub
sudo:jupyterhub:找不到命令

解决办法:创建文件软连接

#which 查找文件位置
[root@solr3 anaconda3]# which jupyterhub
/root/anaconda3/bin/jupyterhub
[root@solr3 anaconda3]# sudo which jupyterhub
which: no jupyterhub in (/sbin:/bin:/usr/sbin:/usr/bin)
[root@solr3 anaconda3]# sudo ln -s /root/anaconda3/bin/jupyterhub /usr/bin/jupyterhub
[root@solr3 anaconda3]# sudo jupyterhub 

显示一个文件权限


[root@solr3 anaconda3]# ls -l jupyterhub_config.py
-rwxrwxrwx. 1 root root 693 10月 31 13:19 jupyterhub_config.py
#chmod更改权限
[root@solr3 anaconda3]# chmod 600 jupyterhub_config.py
[root@solr3 anaconda3]# ls -l jupyterhub_config.py
-rw-------. 1 root root 693 10月 31 13:19 jupyterhub_config.py
#ll 命令显示文件夹中所有文件权限
[root@solr3 anaconda3]# ll
总用量 184
drwxrwxrwx.   2 root root  8192 10月 28 14:37 bin
drwxrwxrwx.   2 root root  8192 10月 28 13:17 conda-meta
drwxrwxrwx.   3 root root    19 10月 28 12:57 doc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值