ubuntu出现如下错误:

{

Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.15.0-42-generic x86_64)

* Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

77 packages can be updated.
0 updates are security updates.

*** System restart required ***
Last login: Fri Dec  7 13:59:33 2018 from 10.12.21.2
-bash: ls: No such file or directory
-bash: lesspipe: No such file or directory
-bash: dircolors: No such file or directory
-bash: ls: No such file or directory
carrie@carrie-MMLP7AP-V7:~$ sudo su -l
Command 'sudo' is available in '/usr/bin/sudo'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
sudo: command not found

}

原因是:

默认的环境变量错误,

#cat /etc/profile

export PATH=

修改错误:

# export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

# reboot

重启机器,登陆OK。
---------------------
作者:IT界的佛系少女
来源:CSDN
原文:https://blog.csdn.net/qq_38693296/article/details/84935566
版权声明:本文为博主原创文章,转载请附上博文链接!

-bash: ls: No such file or directory 产生的原因及修改方法的更多相关文章

  1. -bash: ls: No such file or directory 错误的原因及解决办法

    ubuntu出现如下错误: { Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.15.0-42-generic x86_64) * Documentation: ...

  2. ubuntu 运行android sdk 下的工具adb报bash: ./adb: No such file or directory

    运行adb出现这种错误: bash: ./adb: No such file or directory   但adb确实存在. 可能1:你用的是64位的Linux,没装32位运行时库,安装 $ sud ...

  3. hadoop问题: bin/hadoop fs -ls ls: `.': No such file or directory

    问题描述:bin/hadoop fs -ls ls: `.': No such file or directory 问题分析:版本问题,用法不同 https://stackoverflow.com/q ...

  4. bash: ./adb: No such file or directory

    运行adb出现这种错误: bash: ./adb: No such file or directory   但adb确实存在. 可能1.你用的是64位的Linux,没装32位运行时库,安装 $ sud ...

  5. DedeTag Engine Create File False提示的种种原因及解决方法

    DedeTag Engine Create File False提示的种种原因及解决方法 第一种情况:站点.文件夹权限不足造成无法建立文件 这种情况的出现,一方面可能是Apache设置的读写权限较严格 ...

  6. hadoop中 bin/hadoop fs -ls ls: `.': No such file or directory问题

    2.x版本上的使用bin/hadoop fs -ls  /就有用 应该使用绝对路径就不会有问题 mkdir也是一样的 原因:-ls默认目录是在hdfs文件系统的/user/用户名(用户名就命令行@符号 ...

  7. centos systemctl daemon-reload 提示 no such file or directory 的一个原因

    service 的文件名写错了 比如 mongodb.service 写成了 mongodb.srvice 真的是坑,居然没有提示具体的路径,只是提示一个 no such file or direct ...

  8. 解决hadoop中 bin/hadoop fs -ls ls: `.': No such file or directory问题

    出现这样的问题确实很苦恼...使用的是2.7版本..一般论坛上的都是1.x的教程,搞死人 在现在的2.x版本上的使用bin/hadoop fs -ls  /就有用 应该使用绝对路径就不会有问题.... ...

  9. hadoop fs -ls no such file or directory

    http://blog.csdn.net/baolibin528/article/details/43650919

随机推荐

  1. 使用vue自定义简单的消息提示框

    <style scoped> /** 弹窗动画*/ a { text-decoration: none } .drop-enter-active { /* 动画进入过程:0.5s */ t ...

  2. phpize是什么

    安装php(fastcgi模式)的时候,常常有这样一句命令:/usr/local/webserver/php/bin/phpize一.phpize是干嘛的?phpize是什么东西呢?php官方的说明: ...

  3. 学Python的原因

    先立个旗,不学会誓不为人!!!!!!!!!!! 一直以来总是三天打鱼,两天晒网的学习,但是在体制内混久了发现,失去了很多的东西,得到的确极其有限,总感觉这样的生活会失去意义. 寻找生活的激情,重新发现 ...

  4. Reference.svcmap: Could not load file or assembly

    Reference.svcmap: Could not load file or assembly 在添加服务的时候出现如上错误, 把这个勾去掉就可以了.

  5. sqlserver存储过程sp_send_dbmail邮件(html)实际应用

    前段时间因工作需求,特地学习了下sp_send_dbmail的使用,发现网上的示例对我这样的菜鸟太不友好/(ㄒoㄒ)/~~,好不容易完工来和大家分享一下,不谈理论,只管实践! 如下是实际需求: -- ...

  6. JS数据类型的判断

    在 ECMAScript 规范中,共定义了 7 种数据类型,分为 基本类型 和 引用类型 两大类,如下所示:    基本类型:String.Number.Boolean.Symbol.Undefine ...

  7. ROS--导航、路径规划和SLAM

    一.用move_base导航走正方形 1. roscore 2.执行 roslaunch rbx1_bringup fake_turtlebot.launch 然后 roslaunch rbx1_na ...

  8. 解决spring-security session超时 Ajax 请求没有重定向的问题

    开始时, 代码是这样的: $.ajax({ type : "POST", url : sSource, cache : false, dataType : "json&q ...

  9. C#设计模式(4)——抽象工厂模式(Abstract Factory)

    简单工厂模式: 简单工厂模式的工厂类随着产品类的增加需要增加额外的代码 工厂方法模式: 工厂方法模式每个具体工厂类只完成单个实例的创建,所以它具有很好的可扩展性 但是在实际应用中,一个工厂不止会创建单 ...

  10. Jenkins部署报weblogic.deploy.api.tools.deployer.DeployerException: Java heap space

    Jenkins部署报weblogic.deploy.api.tools.deployer.DeployerException: Java heap space异常 解决办法: 在MAVEN_OPTS中 ...