由於工作中常用linux系統,有些常用命令就記住了,在這裡給大家參考一下!
由於工作中常用linux系統,有些常用命令就記住了,在這裡給大家參考一下!
Linux 常用命令
Ø
檢視核心版本:uname –r
(or
uname -a)
Ø
檢視詳細的版本:cat /proc/version
Ø
檢視核心版本:uname –r
(or
uname -a)
Ø
檢視詳細的版本:cat /proc/version
or cat /etc/release
cat /etc/issue
一般的unix都是在/etc/*release*的檔案或者是/etc/*version*,這裡面描述了版本資訊
redhat的是/etc/redhat-release
Ø
檢視記憶體大小及狀態:free
Ø
檢視硬碟的大小及狀態:df –lh
Ø
檢視硬碟所有分割槽:fdisk -l
Ø
檢視CPU型號:cat /proc/cpuinfo
Or
top
Ø
檢視CPU個數:到/proc/acpi/processor/ 目錄下看看有幾個CPU資料夾即可。如果只有一個,則只有CPU0資料夾
Ø
檢視IP地址:ifconfig
Ø
配置ip命令:netconfig
Ø
使ip生效:service network restart
Ø
啟動ftp服務:service vsftpd restart
Ø
啟動telnet服務:
²
chkconfig telnet on //該命令修改了/etc/xinetd.d/telnet的配置,設定disable=no
²
service xinetd restart
²
chkconfig –list
檢視telnet 啟動狀態
Ø
關閉linux的防火牆:service iptables stop
1 刪除非空目錄
rm -fr 目錄名
2 檢視所有系統的程式
用netstat -an
cat /etc/issue
一般的unix都是在/etc/*release*的檔案或者是/etc/*version*,這裡面描述了版本資訊
redhat的是/etc/redhat-release
Ø
檢視記憶體大小及狀態:free
Ø
檢視硬碟的大小及狀態:df –lh
Ø
檢視硬碟所有分割槽:fdisk -l
Ø
檢視CPU型號:cat /proc/cpuinfo
Or
top
Ø
檢視CPU個數:到/proc/acpi/processor/ 目錄下看看有幾個CPU資料夾即可。如果只有一個,則只有CPU0資料夾
Ø
檢視IP地址:ifconfig
Ø
配置ip命令:netconfig
Ø
使ip生效:service network restart
Ø
啟動ftp服務:service vsftpd restart
Ø
啟動telnet服務:
²
chkconfig telnet on //該命令修改了/etc/xinetd.d/telnet的配置,設定disable=no
²
service xinetd restart
²
chkconfig –list
檢視telnet 啟動狀態
Ø
關閉linux的防火牆:service iptables stop
1 刪除非空目錄
rm -fr 目錄名
2 檢視所有系統的程式
用netstat -an
3 linux載入windows fat32的硬碟
mount -t vfat /dev/sda7 /mnt/fat32
mount -t vfat /dev/sda7 /mnt/fat32
4 查主機名稱:
hostname
5 在雙系統中,在linux系統怎麼可以共享到windows的檔案
1)檢視硬碟的掛載情況
[root@localhost ~]# fdisk -l
Disk /dev/sda: 80.0 GB, 80025280000 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/sda2 2551 9729 57665317+ f W95 Ext'd (LBA)
/dev/sda5 2551 5100 20482843+ b W95 FAT32
/dev/sda6 5101 7650 20482843+ b W95 FAT32
/dev/sda7 7651 9728 16691503+ 83 Linux
2)把windows的硬碟載入到linux
[root@localhost mnt]# mount -t vfat /dev/sda5 /mnt/windows/
linux 中刪除使用者:
userdel -r oracle
如果使用者正在適用,用root使用者刪除/etc/passwd檔案中的使用者即可
1 在vi中用shift鍵+G 看到檔案的最底端。
2 rm -rf test :強制刪除test不為空的資料夾
hostname
5 在雙系統中,在linux系統怎麼可以共享到windows的檔案
1)檢視硬碟的掛載情況
[root@localhost ~]# fdisk -l
Disk /dev/sda: 80.0 GB, 80025280000 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/sda2 2551 9729 57665317+ f W95 Ext'd (LBA)
/dev/sda5 2551 5100 20482843+ b W95 FAT32
/dev/sda6 5101 7650 20482843+ b W95 FAT32
/dev/sda7 7651 9728 16691503+ 83 Linux
2)把windows的硬碟載入到linux
[root@localhost mnt]# mount -t vfat /dev/sda5 /mnt/windows/
linux 中刪除使用者:
userdel -r oracle
如果使用者正在適用,用root使用者刪除/etc/passwd檔案中的使用者即可
1 在vi中用shift鍵+G 看到檔案的最底端。
2 rm -rf test :強制刪除test不為空的資料夾
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12778571/viewspace-165726/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 工作中總結的30個常用Linux指令,實在記不住就別硬記了,看這篇就夠了Linux
- 【BBED】Oracle bbed常用命令參考Oracle
- 【RMAN】Oracle rman 常用命令參考Oracle
- RHEL 5基礎篇—Linux常用命令參考手冊Linux
- 常用的Linux,記住了幾個?Linux
- Linux系統常用命令Linux
- Linux裡常用命令Linux
- 短視訊到底怎麼運營呢?這裡給大家分析一下!
- Linux系統管理-常用命令Linux
- 大家有做筆記的習慣?這裡推薦一下 vuepress筆記Vue
- Linux系統巡檢常用命令Linux
- 初學Linux最初選擇系統參考Linux
- 零基礎如何系統學習Java?這裡有些建議Java
- Linux(六):系統運維常用命令Linux運維
- Linux系統常用命令速查手冊Linux
- linux常用命令解析三(常用系統工作命令cal)Linux
- 關於在javabean裡封裝,大家來看看這樣做怎樣?JavaBean封裝
- Oracle常用Event參考Oracle
- Linux 常用命令記錄Linux
- 接手前端新專案?這裡有些注意點你可能需要留意一下前端
- Linux系統管理和維護常用命令Linux
- linux系統維護常用命令之sarLinux
- 最值得參考的 Kubernetes (K8S)安裝文件在這裡K8S
- AIX系統常用命令AI
- Linux系統程式設計(14)——shell常用命令Linux程式設計
- Linux常用命令記錄-grepLinux
- Solaris系統與Linux系統常用命令的區別介紹Linux
- Linux系統命令彙總之系統備份常用命令(轉)Linux
- 給大家在linux上檔案系統選擇上的一些建議(轉)Linux
- 系統移植——uboot常用命令boot
- oracle裡常用命令(轉)Oracle
- linux系統基礎的優化以及常用命令Linux優化
- Linux系統中檢視程式埠常用命令有哪些?Linux
- 如何檢視Linux系統版本?常用命令有哪些?Linux
- Linux-Unix系統操作與維護常用命令Linux
- 常用的Oracle指令碼參考Oracle指令碼
- Linux 常用命令 學習筆記Linux筆記
- tcl/tk參考——系統相關glob