ssh -L -NT 3306:127.0.0.1:3306 www.baidu.com # L本地 N参数,表示只连接远程主机,不打开远程shell;T参数,表示不为这个连接分配TTY。
#没有ifconifg下查看ip
ip addr
#下载所有依赖包
#安装工具
yum install yum-utils
yumdownloader --resolve --destdir=/root/mypackages/ httpd
#命令补全
yum -y install bash-completion
#修改时区
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#同步时间
date -s '2014-11-21 12:48:30'
ntpdate cn.ntp.org.cn
ntpdate ntp6.aliyun.com
yum clean all
yum makecache
安装bzip2软件
yum install bzip2
检查依赖项
ldd /usr/bin/fprobe
find查找可执行文件
find . -perm -u=x
find /path -executable -type f
find /path -perm /u=x,g=x,o=x
find . -perm -007
#防火墙
iptables -L -n --line-numbers //查看列表并显示相应行号
iptables -A INPUT -p tcp --dport 22 -j ACCEPT //将22端口添加到链表
iptables -I INPUT 2 -p tcp --dport 22 -j ACCEPT //将22端口插入链表第2行
iptables -D INPUT 2 //删除
service iptables save //保存
[root@tp ~]# iptables -P INPUT DROP
[root@tp ~]# iptables -P OUTPUT ACCEPT
[root@tp ~]# iptables -P FORWARD DROP
#systemctl
systemctl enable httpd.service
systemctl disable httpd.service来自: http://man.linuxde.net/systemctl
systemctl status httpd.service (服务详细信息)
systemctl is-active httpd.service (仅显示是否 Active)
systemctl list-units --type=service
systemctl start httpd.service
systemctl restart httpd.service
#显示行号
nl log2017.log
nl -b a log2017.log #空行也算
nl -b a -n rz log2015.log #前面补0
pkill -kill -t pts/2
md5sum -c 20170810.md5
1,列出某个IP地址所提供的共享文件夹
smbclient -L 198.168.0.1 -U username%password
2,像FTP客户端一样使用smbclient
smbclient //192.168.0.1/tmp -U username%password
使用代理
curl -x 10.0.0.172:80 www.baidu.com
删除空目录
find -type d -empty
linux学习笔记
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 1.目前Linux有两种主要的操作模式: 图形界面(X Window)命令行界面(Command Line) 2....
- 目录导读 用户与用户组 Linux文件权限概念 Linux文件种类与扩展名 Linux的目录配置 Linux的多用...
- 一、命令基本格式 命令提示符 当登录linux系统时,最常见的命令就是:** [root@bogon ~]#**其...