Strever Fang's Blog

It's all about sharing.

Ubuntu Shell Command

| Comments

Ubuntu 下常用命令

第一篇博文不知道写什么,随便写一些自己常用到的 Shell 命令,顺便熟练一下MarkDown语法。

常用命令

//分屏显示 display the file

more

//对目录加上表示符号“/”

ls -p

//逐页查看,more的升级版本,less is more

less

/正序display the file

cat

//逆序display the file

tac

//创建新文件

touch [filename]

//创建硬链接,同一文件

cp -l

//创建软链接,快捷方式

cp -s

//display 从开始到第num

head -[num]

//display 从结尾到倒数第[num]行

tail -[num]

//开机自启动

chkconfig [service] on

//查看ALSA驱动版本

alsactl -v

//process查看

ps

//实时process查看

top

//检查 mysqld 进程是否已经开启

pgrep mysqld

//查找已安装包中的qq-for-wine

dpkg -l | grep qq-for-wine

//挂载sdb1到MTP目录下

mount -t vfat /dev/sdb1 /media/mtp

//挂载*.iso到mnt

mount -t iso9660 -o loop *.iso mnt

//查看磁盘使用情况

df --human

//查看文件类型

file

// 查看文件状态信息

stat

//vsftpd:

service vsftpd start

//sshd:

service sshd start

//iptable:

service iptables stop

//查找文件

find -name

//系统默认使用哪个java版本:

which javac

常用软件

    sudo apt-get install rar vlc vlc-plugin-pulse cheese compizconfig-settings-manager cairo-dock gimp uget aria2

    sudo apt-get install eclipse vim vim-gtk emacs codeblocks build-essential gcc g++ mysql-server mysql-client php5-mysql

DuoShuo Comments

Disqus Comments