Comparison and Differences beteen Powershell and Linux

Comparison beteen Powershell and Linux

  • I) common parts, the same
    • 1.1) functions on Powershell and Linux
  • II)difference points
    • 2.1) CD : change directory
      • 2.1.1) Powershell : command cd has no effect, which only usually combines with disk path/route
      • 2.1.2) Linux : command cd, means to go to home disk route

I) common parts, the same

1.1) functions on Powershell and Linux

Powershell: shell or script of Windows to operate on Windows
Linux:shell or script of Linux to operate on Linux OS

II)difference points

2.1) CD : change directory

2.1.1) Powershell : command cd has no effect, which only usually combines with disk path/route

 C:\Users\Administrator> cd ..
PS C:\Users> cd
PS C:\Users> cd
PS C:\Users> cd ~
PS C:\Users\Administrator> cd ..

2.1.2) Linux : command cd, means to go to home disk route

[root@iZ2vc5lqzt23aweti4j777Z home]# cd
[root@iZ2vc5lqzt23aweti4j777Z ~]# pwd
/root

Linux指令记录。cd ~和cd / 区别

1.cd ~ 是跳转到当前用户的家目录。这个 ~ 就相当于/home/vivian(用户名)指令
如果是root用户,cd ~ 相当于 cd /root
如果是普通用户,cd ~ 相当于cd /home/当前用户名 (开机登录的时候,比如vivian)

2.cd / 是跳转到根目录,根目录是所有用户共享的目录,

3.cd /home 相当于查看有多少普通用户的家目录
————————————————
版权声明:本文为CSDN博主「DADIAN_GONG」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/DavidsonGong/article/details/135111733

你可能感兴趣的:(OS,operation,system,linux,运维,服务器)