`
Luob.
  • 浏览: 1572925 次
  • 来自: 上海
社区版块
存档分类
最新评论

Mac 常用设置

    博客分类:
  • Mac
oxs 
阅读更多
使用U盘制作 Mac 系统
https://segmentfault.com/a/1190000015806408

先格式化U盘 然后 在命令行中输入
下面的命令 
sudo /Applications/Install\ macOS\ Mojave\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/mojave --applicationpath /Applications/Install\ macOS\ Mojave\ Beta.app --nointeraction


mac系统如何处理来自身份不明的开发者
打开终端(终端在 应用程序 -> 实用工具 内)
sudo spctl --master-disable


brew 的安装
https://brew.sh/index_zh-cn

命令行 输入如下 命令 进行
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

高坂本系统 安装低版本jdk

brew tap caskroom/versions
brew cask install java8


navicat 破 解
https://blog.csdn.net/xhd731568849/article/details/79751188


SSH脚本自动登录
先安装
brew install expect
brew install spawn-fcgi

然后新建 login.sh

#!/usr/bin/expect
spawn ssh -i /Users/luobin/Downloads/id_rsa  $user@$ipaddress
expect {
        "*password:" { send "$password\r" }
        "yes/no" { send "yes\r;exp_continue" }
}
interact




mac 链接window 共享

command+k   输入 smb://ip  点击链接



ll 命令 设置
//新建 环境变了配置文件
vim  ~/.bash_profile

//在最后面加上以下代码保存

alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

//最后在终端输入,回车

source .bash_profile




修改 /var 权限

sudo chown root:admin /var
sudo chown root:admin /var/log
sudo chmod g+w /var/log




修改hosts
vi   /etc/hosts 
0.0.0.0         account.jetbrains.com


修改DNS

networksetup -setdnsservers Wi-Fi empty

networksetup -setdnsservers Wi-Fi 10.1.1.1.



配置环境变了
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

export PATH=$PATH:/usr/local/Cellar/gradle-3.2.1/bin


source ~/.bash_profie




常用快捷键
command +空格 打开程序搜索框
command+ tab 切换应用程序
command+q 切换应用程序后 退出
shift+command+q 锁屏
shift+command+5 截屏
option+command+d 隐藏程序栏坞


command+k 打开远程连接
command+f3  显示桌面
option+esc+command 打开强制退出程序框
shift+command+D 打开电脑文件夹


control+command+f  窗口 放大缩小
command+m 最小化当前窗口


command+n  新建一个窗口
command+f 查找
command+w  关闭浏览器当前页
shift+command+n 进入无痕模式
command+, 打开设置
option+command+c或者i 打开开发者调试模式


空格键  快速看下一页
command+x 剪切
command+cv 复制粘贴
command+a 全选
command+z 撤销上一步的操作

shift+command+n 新建一个文件夹
command+delete 删除 
command+E  推出宗卷



terminal 换行覆盖问题
1)配置文件:vim ~/.bash_profile

PS1="\[\e[0;31m\] \u@\h \W\$ \[\e[m\] "

//ls 命令添加颜色
  alias ll='ls -alF'
  alias la='ls -A'
  alias l='ls -CF'
  
  export PATH=$PATH:/usr/local/Cellar/gradle-3.2.1/bin
  
 export LS_OPTIONS='--color=auto'
 export CLICOLOR='Yes'



source ~/.bash_profile

https://www.jianshu.com/p/e1d88647e4f1


设置vim 背景颜色
// 复制系统的 .vimrc 配置到当前用户  然后修改配置

cp -r /usr/share/vim/vimrc ~/.vimrc

vim  ~/.vimrc

添加
syntax on
set nu!
set autoindent

保存退出




//取消系统 智能ABC 输入法

//1 下载 plistEdit pro  软件
https://www.fatcatsoftware.com/plisteditpro/PlistEditPro.zip
打开 PlistEditPro 

sudo open ~/Library/Preferences/com.apple.HIToolbox.plist

依次点开 Root - AppleEnabledInputSources ,会看到一列 item ,找到其中 KeyboardLayout Name 为 ABC 的那一列,将整列 item 删掉,然后 command + S 保存。


//参考  https://www.jianshu.com/p/0ba1292441b9 


//常用软件
iTerm  类似  terminal  主要用来 进行  dump 文件的下载
ITerm 支持  rz  rs 命令 从服务器上传下载文件
https://www.iterm2.com/



Th unarchiver 软件  免费好用的解压软件  
https://theunarchiver.com/



ftp client 安装
brew install telnet 
brew install inetutils 
brew link --overwrite inetutils

然后 打开 terminal  
连接ftp服务器

man ftp 可以看到有这些信息。

 NAME
      ftp -- Internet file transfer program
	
 SYNOPSIS
      ftp [-46AadefginpRtvV] [-N netrc] [-o output] [-P port] [-q quittime]
          [-s srcaddr] [-r retry] [-T dir,max[,inc]] [[user@]host [port]]
          [[user@]host:[path][/]] [file:///path]
          [ftp://[user[:password]@]host[:port]/path[/][;type=X]]
          [http://[user[:password]@]host[:port]/path] [...]
      ftp -u URL file [...]
连接服务器的话基本上就用到上面的讯息了。原本没有看man手册,一直使用

 ftp user@xxx.com port
每次都要输入密码。后来还是用了下面这个更加简单的

 ftp ftp://user:passwd@xxx.com:port
浏览文件

命令和Windows、Linux的命令基本相同

 ftp> cd Documents
 ftp> ls		
 ftp> dir
下载上传文件

 put filename - Upload a file to the server
	
 get filename - Download a file from the server
	
 mput filename - Put multiple files on the server
	
 mget filename - Get multiple files on the server
断开连接

bye:中断与服务器的连接。

 ftp> bye
大部分的命令如下,可敲入man ftp获得

 ls – list the contents of a directory on the FTP server
 cd – change the working directory on the FTP server
 pwd – show the current directory on the FTP server
 get – download files from the FTP server
 put – upload files to the FTP server
 account – include a password with your login information
 bye – terminate an ftp session and close ftp (or use disconnect to simply terminate a session)
 bell – make a cute sound after each file transfer is done
 chmod – change permissions
 delete – your guess is as good as mine (OK, you got me, it’s to delete a file off the server)
 glob – enable globbing
 hash – only functional in Amsterdam
 help – get help
 lpwd – print the local working directory for transfers
 mkdir – create folders on the FTP server
 rmdir – delete folders from the FTP server
 newer – only get a file if it’s newer (great for scripting synchronizations)
 nmap – use positional parameters to set filenames
 passive – use FTP passive mode
 prompt – allows the use of letters to automate answers to prompts
 rate – limit the speed of an upload or download
关于ftp,你甚至还可以写脚本进行文件操作,比如

	#!/bin/bash
	ftp -d krypted.com << ftpEnd
	prompt
	cd /Library/WebServer/Documents
	put “*.html”
	put “*.php”
	cd /Library/WebServer/Documents
	put “*.png”
	quit
	ftpEnd

	#!/bin/bash
	ftp -d krypted.com << ftpEnd
	prompt
	cd /My/Documents
	get “*.doc”
	quit
	ftpEnd
在你的脚本中,可以使用以下几个字符获取一些特定的变量:

%/ – the current working directory of the FTP server
%M – the hostname of the FTP server
%m – the hostname only up to the .
%n – the username used for the FTP server
最后有一个问题,为什么老是有不明的人/机器想登陆我的FTP?= =不过自己也是只有使用的时候才会开。  


分享到:
评论

相关推荐

    Mac版Intellij IDEA常用快捷键和配置.docx

    Mac版Intellij IDEA常用快捷键和配置.docx

    mac版本 Webstorm 设置完美版

    mac系统 webstorm 常用设置,包括字体,主题,快捷键等。。。。让编辑代码更加犀利。

    路由器常用配置命令.doc

    Cisco常用配置命令 Cisco常用配置命令 一.交换机的基本配置 C2950# config terminal 进入全局配置模式 show interface fastethernet0/1 查看端口0/1的配置结果 show interface fastethernet0/1 status 查看端口0/1的...

    mac下redis安装、设置、启动停止方法详解

    主要介绍了mac下redis安装、设置、启动停止方法详解,需要的朋友可以参考下

    迈普交换机常用命令手册.docx

    2、交换机维护常用命令 3 1)查看当前交换机的配置信息 3 2)查看当前交换机端口的概述信息 3 3)查看当前交换机端口的POE状态 4 4)查看当前交换机的MAC地址表的内容 5 5)查看当前交换机的ARP映射表 5 6)查看当前...

    常用绿色工具箱2013

    1.小工具:定时关机、磁盘碎片整理、AIDA64、CPUZ、内存测试、硬盘检测、垃圾清理、u盘病毒免疫器、分辨率设置、快速建立ADSL连接、生成新的安全标示符、输入法设置工具、优化设置、重建图标缓存、显示器检测、...

    瓦斯曲25个常用工具

    查看本机网络、绑定网关的IP和MAC地址 R. 关闭系统还原&关掉调试器Dr. Watson F. 查看本机开放端口及使用该端口的进程 S. 安全打开(U盘)&清除病毒&免疫 G. 配置本机网络属性:定义本机ip网关dns T. CAB单文件...

    Ubar for mac v2.3.3 官方最新版.zip

    uBar 「开始」菜单的设计替代了 Finder 部分功能,比如你可以在这里访问每一个应用程序(默认列表第一个),访问 Finder 任意目录(可在设置里随意增减),访问偏好设置各个选择,启动命令行终端,打开监控器等;...

    Charles for mac 4.2.5稳定版

    Charles 是在 Mac 下常用的网络封包截取工具,在做开发时,我们为了调试与服务器端的网络通讯协议,常常需要截取网络封包来分析,支持web端和手机端抓包。 Charles 通过将自己设置成系统的网络访问代理服务器,使得...

    ip快速设置工具,轻松更改IP

    2.快速切换常用IP并提供方便的常用IP管理功能;3.可以方便操作网卡(禁用/启用/修改名称);4.IP冲突检测及自动处理功能;5.界面美观,支持国际化语言界面(中文,English);6.纯绿色软件,可以放在任意目录使用;·主要...

    Golang常用环境变量说明与设置详解

    但对于一些初学者来说,可能不太明白Go语言中常用的环境变量(Environment variables)的作用以及如何设置环境变量,今天我们来讲讲。 注意:Go提供的Windows操作系统安装包(.msi后缀)安装完成后,会自动配置几个常用...

    mac-dev-setup:用于保存Mac开发环境的初始设置

    Mac偏好设置自制权限疑难解答要点开发人员的OS X(&gt; = Catalina)设置如何重设Mac Command(⌘)-R:安装Mac上安装的最新macOS,而不升级到更高版本。 Option-Command-R:升级到与Mac兼容的最新macOS shift-option-...

    charles-proxy-3.11.4.dmg for mac

    Charles是在mac下常用的截取网络封包的工具,它通过将自己设置成系统的网络代理访问代理服务器,使用所有的网络访问请求都通过它来完成,从而实现网络封包的截取和分析

    实验二 网络常用命令实验报告

    实验二网络常用命令实验报告 1、IPConfig (1)查看本机的MAC地址和IP地址,截图: 2、Ping命令 (1) Ping 127.0.0.1,127.0.0.1 是回送地址,Ping回送地址是为了检查本地的TCP/IP协议有没有设置好;截图: (2)Ping...

    fiddler-mac.zip

    Fiddler是位于客户端和服务器端之间的代理,也是目前最常用的抓包工具之一 。它能够记录客户端和服务器之间的所有 请求,可以针对特定的请求,分析请求数据、设置断点、调试web应用、修改请求的数据,甚至可以修改...

    BetterAndBetter最好用的手势软件

    Mac用触控板和鼠标控制,目前我用过最好用的mac笔记本最好用的手势软件。

    黑苹果快捷键设置

    文档详细说明在黑苹果上如何设置xcode的快捷键和其它常用快捷键

    linux/unix的常用命令在windows中的版本

    比如一些 ls, uname, vi,vim,view,cat等等在linux或者unix/mac下常用的命令,都可以在这里使用.建议复制到C:\windows\system32文件夹下.或者随便放一个位置然后通过path设置环境变量,方便cmd中直接调用.

    iTerm2.1稳定版(mac终端工具)

    书签的存储设置最常用的会议 您可以完全自定义每次会议的支持下,在宏观调控的书签命令 书签可以指定处理的网址如FTP 创建配置文件管理书签设置 反闲置功能,避免脱节 支持所有语言的编码 用户可以指定第二个字体...

    Mac系统下Webstorm快捷键整理大全

    所以专门整理一下最常用的那几个快捷键,以方便这段时间来熟悉熟悉,提高效率。 一. 查找 command + g 在当前文件中查找 command + shift + f 在某文件夹下查找 command + r 替换 二. 选择 command

Global site tag (gtag.js) - Google Analytics