今天登录linux测试机,想要创建目录,ls的时候,找不到之前的的目录,才发现是目录不对的问题。

首先,先要弄清楚 [root@330c353813ea ~] 和 [root@330c353813ea /] 区别

[root@330c353813ea ~]  是linux主目录,相当于/root

[root@330c353813ea /] 是根分区,相当于根目录

➜ ~ ssh root@xxx       //登录linux
root@xxx's password:    //输入密码
Last login: Thu Dec 27 16:19:57 2018 from 172.24.36.37
[root@330c353813ea ~]# pwd  //查看目前所在的工作目录的绝对路径
/root
[root@330c353813ea ~]# ls   //显示当前目录下的内容
anaconda-ks.cfg cobbler.ks install.log install.log.syslog ks-post.log ks-post-nochroot.log ks-pre.log
[root@330c353813ea ~]# cd /  //进入根目录
[root@330c353813ea /]# pwd  
/ 
[root@330c353813ea /]# ls   
alc alphacloud_info boot dev home lib64 lost+found misc net proc root selinux srv sys usr
alphacloud_env bin cgroup etc lib libexec media mnt opt python-supervisord-3.1.3-5.x86_64.rpm sbin share supervisord-after-install.sh tmp var
[root@330c353813ea /]# cd home/
[root@330c353813ea home]# ls
sysadmin sysrd project
[root@330c353813ea home]#

登录linux,输入ls显示anaconda-ks.cfg cobbler.ks ....., 原因在于root@ ~ / 区别的更多相关文章

  1. Linux环境变量的修改(永久,暂时)以及修改ls显示的时间格式

    本文转自:http://blog.sina.com.cn/s/blog_8e21864f01014u9h.html Linux修改环境变量,很简单但很重要 一.Linux的变量种类 按变量的生存周期来 ...

  2. Linux下ls命令显示符号链接权限为777的探索

    Linux下ls命令显示符号链接权限为777的探索 --深入ls.链接.文件系统与权限 一.摘要 ls是Linux和Unix下最常使用的命令之一,主要用来列举目录下的文件信息,-l参数允许查看当前目录 ...

  3. 【Linux基础】linux下修改ls显示的时间格式

    1.修改ls显示格式 ls -l --time-style '+%Y/%m/%d %H:%M:%S' drwxr-x--- edwetl edwetl // :: arc_test ls -l --t ...

  4. wordpress登录密码框明文显示最后一个输入的字符

    wordpress登录密码框明文显示最后一个输入的字符 (function(a){a.fn.dPassword=function(c){var e={interval:200,duration:100 ...

  5. linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through socket

    我是小白,大佬勿喷 *** linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through ...

  6. JavaBean组件<jsp:forward>动作<jsp:param>动作登录页面输入用户名和密码,然后进入检查页面判断是否符合要求,符合要求跳转到成功界面,不符合要求返回登录界面,显示错误信息。

    JavaBean组件 JavaBean组件实际是一种java类.通过封装属性和方法成为具有某种功能或者处理某个业务的对象. 特点:1.实现代码的重复利用.2.容易编写和维护.3.jsp页面调用方便. ...

  7. Changing the Color of Linux ls Command 改变Linux的ls命令显示的颜色

    Linux command ls basically use the file /etc/DIR_COLORS or /etc/DIR_COLORS.xterm to define the color ...

  8. linux输入子系统

    linux输入子系统(linux input subsystem)从上到下由三层实现,分别为:输入子系统事件处理层(EventHandler).输入子系统核心层(InputCore)和输入子系统设备驱 ...

  9. LINUX命令LS -AL 解析

    LINUX命令LS -AL 解析 linux命令ls -al 解析 ls是“list”的意思,与早期dos的命令dir功能类似.参数-al则表示列出所有的文件,包括隐藏文件,就是文件前面第一个字符为. ...

随机推荐

  1. sql 排序

    select count(*) from vote group by contents PERCENT * from vote order by contents)as A group by cont ...

  2. apicloud常用分享方法

    app中经常会有分享的功能,不管是分享商品还是文字还是图片或者是发送给微信好友扣扣好友,一下做一总结. 分享的样式(分享所有的样式模块):MNActionButton. 在apicloud 中添加这个 ...

  3. MySql数据库多表操作

    一.连接查询[连表查询.多表查询] 当查询结果的列来源于多张表时,需要将多张表连接成一个大的数据集,再选择合适的列返回 mysql支持三种类型的连接查询,分别为: 内连接查询(inner join) ...

  4. SSM项目中表单分页操作(PageHepler使用)

    Maven pom.xml添加依赖 <dependency> <groupId>com.github.pagehelper</groupId> <artifa ...

  5. swiper 滑动获取当前第几页下标

  6. TFS代码迁移Git

    描述 将TFS上的代码迁移到Git做版本控制. 参考地址 tfs-git下载:https://github.com/git-tfs/git-tfs/releases chocolatey安装:http ...

  7. linux邮件服务

    linux本地常见邮件服务有: Centos5:默认使用sendmail邮件服务,开启方式/etc/init.d/sedmail start Centos6:默认使用postfix邮件服务,开启方式/ ...

  8. Spring Cloud-hystrix使用例子(七)

    继承方式 HystrixCommand public class UserSelectAllCommand extends HystrixCommand<List<User>> ...

  9. 洛谷 P2587 BZOJ 1034 [ZJOI2008]泡泡堂

    题目描述 //不知道为什么BZOJ和洛谷都没有这幅图了,大牛们几年前的博客上都有这幅图的,把它贴上来吧 第XXXX届NOI期间,为了加强各省选手之间的交流,组委会决定组织一场省际电子竞技大赛,每一个省 ...

  10. [Javascript] Understand common misconceptions about ES6's const keyword

    Values assigned with let and const are seen everywhere in JavaScript. It's become common to hear the ...