Mac系统mkdir命令不可用有两种
第一种:
提示:mkdir:11:command not found
解决方案:
选择shell->新建命令,输入disabled_shell_files命令运行,他会在你的主目录下创建一个disabled_shell_files文件夹,然后输入cd ~ 命令切换到主目录,在打开一个终端,新建命令,输入:mv .profile .bash_history .bash_profile .bashrc .inputrc disabled_shell_files,如果没删除成功,可以尝试直接使用rm -rf命令将这个文件夹删除即可,然后再试试mkdir命令,就会发现可以用啦。
第二种:
提示:mkdir:11: Operation not supported
原因:Mac 电脑在 /home目录下新建目录报错
解决方案:
1、编辑/etc/auto_master文件,将包含auto_home> -nobrowse,hidefromfinder的行注视掉
sudo vim /etc/auto_master
# Automounter master map
#
+auto_master> > # Use directory service
#/net> > > -hosts> > -nobrowse,hidefromfinder,nosuid
#/home> > > auto_home> -nobrowse,hidefromfinder
/Network/Servers> -fstab
/-> > > -static
2、保存后,执行 sudo automount
/home % sudo automount
3、最后再重启电脑