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

最新文章

  1. 【目录】开源Math.NET基础数学类库使用总目录
  2. SQL语句在查询分析器中可以执行,代码中不能执行
  3. iOS开发环境C语言基础 变量 、 数据类型和变量赋值 、 其他 、 运算符
  4. Bzoj1818: [Cqoi2010]内部白点 && Tyvj P2637 内部白点 扫描线,树状数组,离散化
  5. Struts1 中$ 没有解析的问题
  6. UIColor各种颜色转换
  7. 图文解说PhpStorm 7.0版本支持PHP 5.5
  8. CodeForces 709C Letters Cyclic Shift
  9. android 属性动画
  10. java 多线程访问同一个对象数据保护的问题
  11. storm从入门到放弃(二),任务分配过程-核心机密
  12. Windows Azure系列-- 配置Azure Power Shell
  13. 数据库sql语句常见面试题
  14. Python2 错误记录1File "<string>", line 1, in <module> NameError: name 'f' is not defined
  15. HDU4960(SummerTrainingDay03-F dp)
  16. 【Alsa】播放声音和录音详细流程
  17. EGit系列第二篇——关联远程仓库
  18. Git-分支管理【转】
  19. 20155204 2016-2017-2 《Java程序设计》第4周学习总结
  20. excel 使用技巧

热门文章

  1. linux系统下的shell脚本
  2. 一步步学习NHibernate(7)——HQL查询(1)
  3. 在JSP中使用BootStrap
  4. oct(x) 将一个数字转化为8进制
  5. Burp Suite Walkthrough(中文版)
  6. Android-java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
  7. 李洪强iOS开发之-环信05_EaseUI 使用指南
  8. ruby使用IO类读写文件
  9. 学习笔记-[Maven实战]-第二章:Maven安装和配置
  10. 一个简单的有向图Java实现