美文网首页
Linux命令

Linux命令

作者: 王宝花 | 来源:发表于2016-07-22 20:47 被阅读40次

查询文件命令

updatedb
locate php-config

来自:http://www.jb51.net/article/31330.htm

项目目录命名

www.wangbaolong.com
future.ydma.cn

设置命令别名

$ cd ~
$ vim .bash_profile

# 内容如下
alias wangbaolong='ls'
# 让别名生效
$ source .bash_profile

非对称加密(公钥和私钥)

# ~/.ssh/
ssh-keygen -t rsa

设置不能使用密码登陆

$ cd /etc/ssh/
$ vim sshd_config
# 取消52行注释,修改为no
 51 # Change to no to disable tunnelled clear text passwords
 52 #PasswordAuthentication no

添加shell脚本

$ cd ~/sh
$ vim wbl.sh      # wbl为自定义的名称
# 文件内容
#!/bin/sh
ls -a

修改权限chmod 755 wbl.sh
可以执行了。

$ ~/sh/wbl.sh
tail
head

相关文章

网友评论

      本文标题:Linux命令

      本文链接:https://www.haomeiwen.com/subject/zwiijttx.html