程序员对Mac OS 初次使用的体验

来源:互联网 发布:推荐高仿aj淘宝店 编辑:程序博客网 时间:2024/06/06 17:10

作为一名屌丝,对Mac OS这样一款传说中的操作系统一直是只能远观。近日在姻缘巧合之下,有幸在公司得到一台Mac台式机,借此机会感受下与常用的Windows7以及CentOS\Ubuntu\Fedora等Linux1系列操作系统的感知差异。

联网(Mac OS 如何联有线网络)

这时我发现Mac的配置与Linux极其相似。(我的工作环境需要设置固定IP才可惜联网)

->左上角苹果图标->系统偏好设置->网络->以太网->设置IP

五笔输入法(Mac OS 如何使用五笔输入法)

->右上角输入法图标->输入偏好设置->“+”号增加输入法(“-”号是删除)->选择五笔(或拼音)

作为一名五笔玩家,刚开始发现Mac自带的五笔实在是不好用,很多时候只能的单字,许多的常用词组都不能识别,而且还不支持混输(这里指输入不流畅)。
不过,使用了一会之后,发现使用习惯的原因占很大的比重,所以耐心等自己慢慢习惯喽。

常用切换输入法的方式:

切换中英文方式:
1. Ctrl + Space(空格)
2. Caps Lock(大小写锁定)

打开终端(Mac OS 如何使用Terminal终端)

左下角Finder->应用程序->实用工具->终端

由于终端Terminal才是程序员最需要且最有用的应用,所以先将其放入下方的快捷方式。

到这里,发现 ls、cd、pwd等命令都是可以正常使用的,看来,传说Mac源于Unix的传言果然不虚。

增加root用户(Mac OS如何增加root用户)

macdeiMac:Applications xiaoqw$ su rootPassword:su: Sorry #这里还不能切换为root用户macdeiMac:Applications xiaoqw$ sudo sush-3.2# passwd rootChanging password for root.New password:Retype new password:sh-3.2# sh-3.2# sh-3.2# exitexitmacdeiMac:Applications xiaoqw$ su #这里已经可以了Password:sh-3.2# sh-3.2# sh-3.2# ls

如何安装brew(Mac OS 如何用命令行的方式安装软件)

sh-3.2# curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1

安装后使用brew安装软件时出现几个ERROR:

Error: Unknown command: install
Error: Unknown command: uninstall

解决方法:

执行brew发现问题的原因是brew的版本需要更新,执行brew update,按照提示信息操作,最后解决问题。

主要命令:

macdeiMac:/ xiaoqw$ sudo chown -R $(whoami) /usr/localmacdeiMac:/ xiaoqw$ sudo chown root:wheel /usr/localmacdeiMac:/ xiaoqw$ brew update

具体过程记录如下:

macdeiMac:/ xiaoqw$ brewPlease run brew update!macdeiMac:/ xiaoqw$ brew updateError: /usr/local must be writable!macdeiMac:/ xiaoqw$ suPassword:sh-3.2# brew updateInitialized empty Git repository in /usr/local/.git/remote: Counting objects: 1122, done.remote: Compressing objects: 100% (1032/1032), done.remote: Total 1122 (delta 117), reused 380 (delta 50), pack-reused 0Receiving objects: 100% (1122/1122), 1.20 MiB | 1.15 MiB/s, done.Resolving deltas: 100% (117/117), done.From https://github.com/Homebrew/brew * [new branch]      master     -> origin/masterHEAD is now at 5b04152 Merge pull request #3133 from MikeMcQuaid/travis-umaskTo restore the stashed changes to /usr/local run:  'cd /usr/local && git stash pop'Error: Running Homebrew as root is extremely dangerous and no longer supported.As Homebrew does not drop privileges on installation you would be giving allbuild scripts full access to your system.sh-3.2# exitexitmacdeiMac:/ xiaoqw$ sudo brew updateError: Running Homebrew as root is extremely dangerous and no longer supported.As Homebrew does not drop privileges on installation you would be giving allbuild scripts full access to your system.macdeiMac:/ xiaoqw$ brew updateError: /usr/local is not writable. You should change theownership and permissions of /usr/local back to youruser account:  sudo chown -R $(whoami) /usr/localmacdeiMac:/ xiaoqw$ sudo chown -R $(whoami) /usr/localmacdeiMac:/ xiaoqw$ brew update==> Homebrew has enabled anonymous aggregate user behaviour analytics.Read the analytics documentation (and how to opt-out) here:  https://docs.brew.sh/Analytics.html==> Tapping homebrew/coreCloning into '/usr/local/Library/Taps/homebrew/homebrew-core'...remote: Counting objects: 4556, done.remote: Compressing objects: 100% (4344/4344), done.remote: Total 4556 (delta 36), reused 461 (delta 12), pack-reused 0Receiving objects: 100% (4556/4556), 3.63 MiB | 5.78 MiB/s, done.Resolving deltas: 100% (36/36), done.Checking out files: 100% (4577/4577), done.Tapped 4341 formulae (4,601 files, 11.3MB)Already up-to-date.Error: Could not link:/usr/local/share/doc/homebrewPlease delete these paths and run `brew update`.==> Migrating HOMEBREW_REPOSITORY (please wait)...Error: Could not link:/usr/local/share/doc/homebrewPlease delete these paths and run `brew update`.==> Migrated HOMEBREW_REPOSITORY to /usr/local/Homebrew!Homebrew no longer needs to have ownership of /usr/local. If you wish you canreturn /usr/local to its default ownership with:  sudo chown root:wheel /usr/localmacdeiMac:/ xiaoqw$ sudo chown root:wheel /usr/localmacdeiMac:/ xiaoqw$ brew updateAlready up-to-date.macdeiMac:/ xiaoqw$ brewExample usage:  brew search [TEXT|/REGEX/]  brew (info|home|options) [FORMULA...]  brew install FORMULA...  brew update  brew upgrade [FORMULA...]  brew uninstall FORMULA...  brew list [FORMULA...]Troubleshooting:  brew config  brew doctor  brew install -vd FORMULADevelopers:  brew create [URL [--no-fetch]]  brew edit [FORMULA...]  https://docs.brew.sh/Formula-Cookbook.htmlFurther help:  man brew  brew help [COMMAND]  brew home

本文先写这些,后绪有空再更新。