---
title: "ubuntu 简单常用命令"
author: "lc0451"
date: "2010-07-14T10:27:47Z"
tags: []
categories: ["操作系统"]
slug: "ubuntu"
draft: false
lastmod: "2010-07-14T10:36:04Z"
id: 712274
url: "https://lc0451.iteye.com/blog/712274"
---

把终端加到右键菜单:sudo apt-get install nautilus-open-terminal

查看java进程：ps aux|grep java

 升级ubuntu支持4G内存：sudo apt-get install linux-headers-server linux-image-server linux-server

 ps -ef|grep httpd

chmod 4755  4表示其他用户执行文件时，具有与所有者相当的权限

scp -r  需要拷贝的文件名  userName[@IP:/home/userName/](mailto:userName@IP:/home/userName/)..

lsof -i:&lt;port&gt;

 

 

 

windows 下的 hosts 路径C:\\WINDOWS\\system32\\drivers\\etc\\hosts

 

 

#### []()[常用用法]()

##### [查找指定文件的使用]()

$ lsof /etc/passwd

##### [查找指定文件系统的使用]()

lsof /tmp

查找Unlinked的打开文件：lsof +L1

 

##### [查找监听的socket]()

$ lsof –i

$ lsof [-i@aaa.bbb.ccc](mailto:-i@aaa.bbb.ccc)

$ lsof -iTCP@aaa.bbb.ccc:ftp-data

##### [查找指定进程号或进程名使用的文件]()

lsof -p &lt;PID&gt;

 

##### [远程登陆侦测]()

 

$ lsof /dev/pts/0

 

##### [NFS]()文件

$ lsof –N

##### [指定用户打开的文件]()

 

lsof -u ^root