ubuntu 使用小技巧

ubuntu 使用小技巧


一、terminal使用

  1. 使用tmux,让你一个窗口分割
  2. 修改窗口标题:
    修改文件~/.bash.rc添加
    # Update gnome terminal title
    

function termtitle() {
# take argument
PS1="\u@\h:\w$ "
TITLE=$1
shift
# update title
PROMPT_COMMAND=‘echo -ne “\033]0; $TITLE \007”’
}
```

在终端输入```termtitle "new title"```即可把窗口名称改为"new title"
  1. 缩短命令行的前缀xxx@xxxx,修改~/.bashrc文件的PS1变量

if [ " c o l o r p r o m p t " = y e s ] ; t h e n P S 1 = ′ color_prompt" = yes ]; then PS1=' colorprompt"=yes];thenPS1={debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]$ ’
else
PS1='KaTeX parse error: Expected '}', got 'EOF' at end of input: …ebian_chroot:+(debian_chroot)}\u@\h:\w$ ’
fi

```

SSL 证书创建问题

根据官方方法:
https://www.akadia.com/services/ssh_test_certificate.html
在步骤

dl@dl:~/my_github/my_room/libevent_https$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
Getting Private key
unable to write 'random state'

解决办法:

sudo rm ~/.rnd
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值