zoukankan      html  css  js  c++  java
  • mac使用初级

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

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

    export CLICOLOR=1
    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=1
    export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
    
    # Terminal colours (after installing GNU coreutils)
    NM="[33[0;38m]" #means no background and white lines
    HI="[33[0;36m]" #change this for letter colors
    HII="[33[0;32m]" #change this for letter colors
    SI="[33[1;33m]" #this is for the current directory
    IN="[33[0m]"#export PS1="$NM[ $HIu $HIIh $SIw$NM ] $IN"
    export PS1="$HIu@$HIIh: $SIw $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

  • 相关阅读:
    几个前端时间插件总结
    微信支付——退款篇
    getTime()方法在苹果系统的bug
    【转载】[JS]让表单提交返回后保持在原来提交的位置上
    【转载】 IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
    webstorm相关设置
    检测无标题的
    数组去重的方法
    Git 版本比较
    Git 回到过去
  • 原文地址:https://www.cnblogs.com/welhzh/p/4281508.html
Copyright © 2011-2022 走看看