[摘抄-Linux-學習中]基礎操作命令記錄__Linux

來源:互聯網
上載者:User
1、編譯普通C檔案: gcc main.c -o main

2、啟動memcached ./memcached -d -m 128 -u root -l 10.161.231.6 -p 12001 -c 256 -P /tmp/memcached12001.pid
3、啟動背景程式運行 nohup ./smartParkMemCached.out > xxxx.log 2>&1 &
4、查看使用者記憶體使用量: top -u root
5、查看磁碟空間使用方式: df -h
6、查看是否安裝了某個軟體: rpm -qa|grep -i mysql
7、卸載某個軟體: yum -y remove mysql-5.5*
8、查看某個連接埠號碼是否在使用: netstat -apn | grep 3306
9、查看防火牆狀態: service iptables status
10、統計TCP進程狀態: netstat -n | awk '/^tcp/ {++y[$NF]} END {for(w in y) print w, y[w]}'
11、 查詢指定連接埠號碼是否被佔用命令: netstat –apn | grep 8080
12、防火牆中添加連接埠號碼 並儲存:(連接埠號碼10005為例) 添加:/sbin/iptables  -I INPUT -p tcp -m state --state NEW -m tcp --dport 10005 -j ACCEPT 儲存:/etc/init.d/iptables save

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.