一些简单的Linux命令
来源:互联网 发布:中国网络直播平台排名 编辑:程序博客网 时间:2024/05/18 21:44
这些命令仅是在工作中的linux机器上运行正常的,在其他系统中正常与否有待验证。
ubuntu: sudo apt-get install
GNU/linux: sudo yum install
uname [-amnrsv][--help][--version]
显示系统信息 http://zhidao.baidu.com/question/39995251
pwd
打印当前目录的路径
grep MemTotal /proc/meminfo
显示机器的内存
grep SwapTotal /proc/meminfo
the size of the configured swap space
free
显示内存空间和交换空间
df -k /tmp
显示一个目录下硬盘空间,没有目录的话显示系统
cat /proc/version
查看linux安装的版本
echo $shell
查看当前shell
chmod 777 file/folder
修改文件(夹)权限
zip -r filename.zip folder file
压缩文件到zip中
unzip file_name.zip (-d filepath)
gunzip filename.cpio.gz
解压缩文件(到指定目录)
unzip *.ear
解压缩ear文件
zip与unzip命令详细参考http://www.cnblogs.com/chinareny2k/archive/2010/01/05/1639468.html
jar -cvf <<ear-name>> <<files want to be in the ear >>
产生.ear文件
cp -r[f] folder1 folder2
拷贝文件夹
su username
切换用户
/usr/local/packages/aime/ias/run_as_root (command)
以root身份运行命令
/usr/local/packages/aime/ias/run_as_root "bash" 切换到root
/usr/local/packages/aime/ias/run_as_root "vi /etc/passwd"
更改主目录,将/home/username替换为新设置的主目录
设置变量值:
csh: set ANT_HOME="/scratch/user/Oracle/ant"
set PATH=${PATH}";/home/user" (根据我的经验仅当前shell有效)
bash: export ANT_HOME="/scratch/user/Oracle/ant"
export PATH=$PATH:${ANT_HOME}/bin (跨shell也保留,但是只当前窗口有效)
ANT安装:http://ant.apache.org/manual/install.html
linux下bash中提示符颜色的设置
vi .bashrc
http://sxpspace.blogspot.com/2009/04/shell.html
netstat -nlp
查看端口情况 p程序 l监听socktes n数值的主机端口和用户
ADE中已经安装vnc后:
vncserver 启动vnc
vncpassword 设置密码
~/.vnc/xstartup里可以设置vncserver的属性
vncconfig -nowin& 解决vnc主客机的相互复制问题
vncserver :1 -geometry 1280x960 端口以及分辨率
- Start vnc by executing the "vncserver" script.
vncserver
VNC will prompt you for a password the first time this script is run. This is the password used to connect to the machine from a vncviewer. I suggest NOT using your SSO password because you may want to share the VNC session with someone.
By default, the vncserver command starts the window manager not a KDE desktop. Therefore, kill the Xvnc process and then edit the command file as described in the following steps. - ps -ef | grep Xvnc // find the Xvnc process id.
- kill <pid>
- cd .vnc (notice the DOT in the directory name)
- vi xstartup // edit the vnc startup script - emacs is also on the machine if you prefer
- change "twm &" to "startkde &" and save the file
- Execute the "vncserver" command again. Now a KDE desktop will start (it takes a few minutes).
- Using vncviewer // TightVNC download
connect to the machine. You now have a remote desktop for development. - If you run "konsole &" from the desktop, it gives you as many shells as you want in the same terminal window.
- Linux的一些简单命令
- 一些简单的Linux命令
- linux的一些简单命令
- linux的一些简单命令
- linux的一些简单命令
- 一些简单的linux命令的例子
- 一些简单常用的linux操作命令
- linux下一些简单的命令~
- 一些简单的Linux网络配置命令
- linux一些简单的操作命令
- LINUX的一些简单命令 时间修改
- Linux下一些简单命令的收集
- Linux学习(1)----一些简单的命令
- linux下的一些简单命令操作
- linux调试的一些简单命令
- 虚拟机和linux一些简单的命令
- LINUX一些常用简单命令
- 最简单的一些linux命令的基本的实现
- 系列前m大数算法总结
- 情感对象抽取【opinion mining】
- 后缀数组
- Ubuntu 12.04安装openGL与opencv
- oracle数据库的使用及安装
- 一些简单的Linux命令
- JUnit中标注Annotation介绍
- 利用Firebug和XPath寻找locator
- Selenium 1.0使用问题集锦
- 多重背包问题解法简单分析(POJ 1276为例)
- 塔防游戏
- hdfs文件写入过程流程分析
- HDU 2065
- mac80211