---
title: "Debian常用命令"
author: "xiaoshan5634"
date: "2011-08-09T09:58:43Z"
tags: ["Debian"]
categories: ["操作系统"]
slug: "debian"
draft: false
lastmod: "2011-08-31T10:34:32Z"
id: 1143178
url: "https://xiaoshan5634.iteye.com/blog/1143178"
---

1、查看端口被占用的程序

lsof -i:25

 

\--------------------------

2、修改域名解析

nano /etc/resolv.conf           --修改域名配置

/etc/init.d/networking restart  --重启网卡

 

3、SSH传输文件命令

man scp

1\. scp /etc/resolv.conf username@B\_HOST:/etc/resolv.conf.A  
2\. scp username@B\_HOST:/etc/resolv.conf /etc/resolv.conf.B  
3\. scp username\_on\_A@A\_HOST:/etc/resolv.conf username\_on\_B@B\_HOST:/etc/resolv.conf.A