imac使用的是login shell,所有开启一个terminal的时候,不会运行.bashrc文件,而是运行.bash_profile文件,因此只需要中home目录新建一个.bash_profile文件,然后在.bash_profile里source .bashrc即可。

imac的terminal中默认没有使用彩色来显示output,可以在.bashrc里输入:

export CLICOLOR=
export LSCOLORS=ExFxCxDxBxegedabagacad #you can use this if you are using a black background:
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx

截至2015-02-09日,我的.bashrc配置文件如下:

#! /bin/sh

#alias ls='ls -G'
alias grep='grep --color=auto' export CLICOLOR=
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx # Terminal colours (after installing GNU coreutils)
NM="\[\033[0;38m\]" #means no background and white lines
HI="\[\033[0;36m\]" #change this for letter colors
HII="\[\033[0;32m\]" #change this for letter colors
SI="\[\033[1;33m\]" #this is for the current directory
IN="\[\033[0m\]"#export PS1="$NM[ $HI\u $HII\h $SI\w$NM ] $IN"
export PS1="$HI\u@$HII\h: $SI\w $NM\$ "

OS X Terminal to move the cursor word by word

Out of the box you can use the quite bizarre Esc+F to move to the beginning of the next word and Esc+B to move to the beginning of the current word.

control-w works just fine for me for deleting a word backwards.

还可以在终端的配置中设置 map option key as meta key.

mac os运行sshd:

运行 /usr/sbin/sshd ,系统报错:

Could not load host key: /etc/ssh_host_rsa_key
Could not load host key: /etc/ssh_host_dsa_key

生成所需的密钥

/usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key
/usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key

然后就可以启动 sshd 服务了:

/usr/sbin/sshd

mac使用初级的更多相关文章

  1. Mac OS X Terminal 101:终端使用初级教程

    Mac OS X Terminal 101:终端使用初级教程 发表于 2012 年 7 月 29 日 由 Renfei Song | 文章目录 1 为什么要使用命令行/如何开启命令行? 2 初识Com ...

  2. 【转】Mac OS X Terminal 101:终端使用初级教程

    最近学习苹果认证的<Mac OS X Support Essentials>教程,看到 Command Line 一节有很多实用的知识,下面选取一部分翻译 + 笔记,整理成此文. 你可以整 ...

  3. Mac 效率工具

    我的Mac开发环境 http://blog.csdn.net/feelang/article/details/45071249 iterm2 http://iterm2.com/documentati ...

  4. 渗透测试工具Nmap从初级到高级使用教程

    本文由阿德马翻译自国外网站,请尊重劳动成果,转载请注明出处,谢谢 Nmap是一款网络扫描和主机检测的非常有用的工具.Nmap是不局限于仅仅收集信息和枚举,同时可以用来作为一个漏洞探测器或安全扫描器.它 ...

  5. HHKB MAC 配置指南 操作指南 快捷键

    1. 设备: mac电脑一台.hhkb键盘一个 2. 初级配置 (1)调节hhkb的模式为Macintosh模式:011001 (打开键盘侧边的滑盖,按照这个顺序调正) (2)Mac电脑安装官方驱动  ...

  6. iOS企业级开发初级课程-表视图(13集)

    首先了解了表视图的组成.表视图类的构成.表视图的分类以及表视图的两个重要协议(委托协议和数据源协议),对表视图有了一个整体上的认识.接下来我们掌握了如何实现简单表视图和分节表视图,以及表视图中索引.搜 ...

  7. 程序员最爱 Mac、JS 是最热门技术

    概况: 今年,有超过5万名开发者向我们分享了他们是谁,做什么工作,以及他们的成果.通过本文,你将看到有史以来最为全面的一次开发者情况调查的结果. 每8秒钟,就会有一位开发者在Stack Overflo ...

  8. Coding 初级教程(二)——上传已有项目

    Coding 初级教程(二)——上传已有项目 [摘要:方针读者 :已具有 Coding.net 的账号. 本文首要先容若何把项目上传到 Coding.net 上. 分两种环境,一种是项目已归入到 gi ...

  9. Android Studio 快捷键 for Mac OS X 10.5+

    Action Mac OSX Win/Linux 注释代码(//) Cmd + / Ctrl + / 注释代码(/**/) Cmd + Option + / Ctrl + Alt + / 格式化代码 ...

随机推荐

  1. C++ map映射的使用方法

    今天考试做了道题,用上了map,这是一道提高组联赛难度的题目,先发题目: ****************************** 1. A-B problem( dec.c/cpp/pas) . ...

  2. Hibernate各种主键生成策略2

    先来看看主键映射的标签: <id   (1)name="propertyName"   (2)column="column_name" (3)type=& ...

  3. informix 查看数据库空间名

    查看bhrs库的空间名  onstat -d 导出一个表 的结构 dbschema -d bhrs -t infotrans > xxx.sql 微网点 报表已经上线 cbs.sql 提交,生产 ...

  4. 用shell查找某个目录下最大文件

    网上资料学习: 1.查找当前目录下最大文件(包括子目录里文件): find . -type f -exec stat -c "%s %n" {} \; | sort -nr | h ...

  5. ios更改UITabBarController背景以及选中背景图片的方法

    一.背景图片  1.5.0以上版本     UIImage *image = [UIImage imageNamed:@"system_tabbar_bg.png"];     [ ...

  6. js 字符串扩展

    <script type="text/javascript" language="javascript"> String.prototype.tri ...

  7. w3c subscribe

    http://www.w3.org/html/ig/zh/ http://blog.csdn.net/spring21st/article/details/6126537 http://www.w3c ...

  8. x86, x86-64, i386, IA32, IA64...

    转自x86, x86-64, i386, IA32, IA64... x86:Intel从16位微处理器8086开始的整个CPU芯片系列,系列中的每种型号都保持与以前的各种型号兼容,主要有8086,8 ...

  9. 1091-Black Vienna

    描述 This problem is based on the game of Black Vienna. In this version there are three players and 18 ...

  10. [wikioi]合并果子

    http://wikioi.com/problem/1063/ 这题是贪心+堆.主要想练习一下堆的写法.算法导论里的方法名是heapify()等,但大家经常用更直观的down(), up()方法(向上 ...