首页 技术 正文
技术 2022年11月6日
0 收藏 533 点赞 997 浏览 1262 个字

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_keyCould 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

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,105
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,582
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,429
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,200
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,836
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,919