backtrack5 mysql密码_backtrack 5 基本配置

BT5配置

BT5本来就是用Ubuntu 10.04做得蓝本,所以,我在配置BT5的时候,基本上都是按照Ubuntu 10.04的配置方法,在配置BT5

1    系统基本设置

1.1  安装Ubuntu10.04

分区时首先为根目录分配最多的硬盘空间,然后为boot目录分配200M,最后为swp目录分配内存的2倍空间。

1.2  利用软碟通UltraISO制作U盘启动的Ubuntu 10.04

安装软碟通

插入U盘

以管理员运行软碟通

启动光盘-> 写入硬盘映像

选择U盘,写入方式usb-hdd+

完成

1.3  更新源

(1)备份源        sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

(2)编辑源        sudo gedit /etc/apt/sources.list

编辑你的源列表,将原来的内容全部删除,添加一个最适合你的源,复制到你的列表中

(3)更新源          sudo  apt-get  update

(4)升级           sudo  apt-get  upgrade

(5)升级系统    sudo  apt-get  dist-upgrade

1.4  更改左边关闭按钮的位置

ubuntu10.04最大的变化可能就是最小化最大化和关闭按钮移到左边去了

按alt+F2进入应用程序运行器,输入gconf-editor进入配置编辑器,依次进入/apps/metacity/general /button_layout

将键值close,minimize,maximize:修改为menu:minimize,maximize,close

再用sudo gconf-editor再把上面的内容修改一次

1.5  中文乱码问题

1.5.1  gedit

在Windows下编辑好txt文件后在Ubuntu中使用Gedit打开出现乱码;这是编码方式不同造成的。Windows下txt文件的编码格式为GBK,Ubuntu Gedit默认没有对GBK的支持,需要手动配置。

(1)打开终端,输入”gconf-editor”,回车后打开配置编辑器;

(2)在左边的树节点找到/apps/gedit-2/preferences/encodings并单击它;

(3)双击右边的auto_detected 键,打开“编辑键”对话框;

(4)单击列表右边的“添加”按钮,输入“GB18030”,单击确定按钮,这样列表的最底部新增加了一个“GB18030”。如果你不放心,可以再增加GBK、GB2312编码。

(5)选中“GB18030”将其移动到列表的顶部。如果你在第四步后发现没有乱码了,这一步也就可以省略了。

(6)但是通过这种方法解决后,又会引来新的问题,那就是,当打开一个空文档 时,gedit会崩溃,那么我总结出来到办法就是,把UTF-8放到最上面去就可以了。

(7)再用sudo gconf-editor再把上面的内容修改一次,就可以解决用sudo gedit编辑文档中文乱码的问题了

1.5.2  Flash中文显示为方块

编辑/etc/fonts/conf.d/49-sansserif.conf 文件

修改第18行,将

sans-serif

修改为

sans

1.5.3  pdf中文乱码

sudo apt-get install poppler-data

sudo mv /etc/fonts/conf.d/49-sansserif.conf /etc/fonts/conf.d/49-sansserif.conf.backup

1

.5.4  更多中文字体

(1)去windows系统里复制所需字体,通常是在C/WINDOWS/FONTS下

(2)在home/你的用户名,下创建一个名为“.fonts”的文件夹(前面的小点意为隐藏的文件夹),将刚才所复制的放入“.fonts”

1.6  双系统怎样让系统默认为从windows启动

在/etc/grub.d目录中的脚本文件的文件名都是以数字开头,这确定了在执行update-grub时各文件内容被执行的顺序

我们只要把30_os-prober这个文件名的数字30改为05到10之间的数字即可(没多少可选06、07、08、09),比如改为08_os-prober

这样创建出来的grub.cfg内的菜单项,windows的排序就会自动在ubuntu之前。

cd /etc/grub.d

sudo mv 30_os-prober 08_os-prober

此外,还有一种方法,手动修改grub2启动配置文件

sudo cp /boot/grub/grub.cfg /boot/grub/grub.cfg_backup

sudo gedit /boot/grub/grub.cfg

1.7  把终端放在右键菜单

sudo apt-get install nautilus-open-terminal

1.9  火狐设置

在Firefox 地址栏里输入“about:config”,然后将修改下面给出的选项到相应的值。

network.http.pipelining > 设为True

network.http.pipelining.maxrequests > 设为8或10

network.http.proxy.pipelining > 设为True

1.11    快捷键

Ubuntu操作基本快捷键

* 打开主菜单= Alt + F1

* 运行= Alt + F2

* 显示桌面= Ctrl + Alt + d

* 最小化当前窗口= Alt + F9

* 最大化当前窗口= Alt + F10

* 关闭当前窗口= Alt + F4* 截取全屏= Print Screen

* 截取窗口= Alt + Print Screen

* 展示所有窗口程序= F10

* 展示当前窗口最上层程序= F11

* 展示当前窗口所有程序= F12

* 切换窗口= Alt + Tab

* 旋转3D桌面= Ctrl + Alt + 左/右箭头

* 旋转3D桌面(活动窗口跟随)= Ctrl + Shift + Alt + 左/右箭头

* 手动旋转3D桌面= Ctrl + Alt + 左键单击并拖拽桌面空白处

* 窗口透明/不透明= possible with the “transset”utility or Alt + 滚轮

* 放大一次= 超级键+ 右击

* 手动放大= 超级键+ 滚轮向上

* 手动缩小= 超级键+ 滚轮向下

* 移动窗口= Alt + 左键单击

* 移动窗口时贴住边框= 左键开始拖动后再Ctrl + Alt

* 调整窗口大小= Alt + 中击

* Bring up the window below the top window = Alt + middle-click

* 动态效果减速= Shift + F10

* 水纹= 按住Ctrl+超级键

* 雨点= Shift-F9

* 桌面展开=Ctrl + Alt + 下箭头,然后按住Ctrl + Alt 和左/右箭头选择桌面

Nautilus

Shift+Ctrl+N – 新建文件夹, 很有用

Alt + Enter – 查看选择文件/文件夹的属性,代替单击右键选择属性

Ctrl + 1/2 – 改变文件夹视图查看方式,图标视图/列表视图

Ctrl + W – 关闭当前Nautilus窗口

Ctrl + Shift + W – 关闭所有Nautilus窗口

Ctrl+T – 在Nautilus中新建一个标签

Alt + Up/Down Arrow – 移动到父文件夹/选择的文件夹

Alt + Left/Right Arrow – 后退/前进

Alt + Home -直接移动到主文件夹

F9 – 开关显示Nautilus侧边栏

Ctrl + H -开关显示隐藏文件夹

其他

Ctrl + Alt + L -锁屏

Alt + F1 – 打开应用程序菜单

Alt + F2 – 打开运行应用程序对话框

Win + 鼠标滚轮 – 放大/缩小屏幕

2    软件安装

2.1  安装Ubuntu额外的版权受限的程序

sudo apt-get install ubuntu-restricted-extras

2.2  安装RAR压缩/解压缩程序

sudo apt-get install rar unrar

建立软链接

sudo ln -fs /usr/bin/rar /usr/bin/unrar

这样,以后只要在命令行输入unrar,就可以解压或者压缩文件了,安装完成后,归档管理器也同时集成了rar组件

安装7zip解压缩软件

sudo apt-get install unrar p7zip-full cabextract

2.3  安装ibus输入法

2.3.1  输入法自启动

Ubuntu系统安装后已经自带了ibus输入法,在英语环境下 默认不启动。

配置ibus自动启动可以在Ubuntu系 统菜单上选择System ―Preferences ―Startup Applications,在该窗口中增加一 个程序:

Name: ibus-daemon

Command: ibus-daemon -d -x Cr

2.3.2  安装智能拼音

ibus 默认提供的中文输入法比较弱智,需要额外安装ibus-pinyin,命令如下:

sudo apt-get install ibus-pinyin

这时,还需要将ibus-pinyin输入法启动。在Ubuntu系 统菜单上选择System ―Preferences ―IBus Preferences,

在Input Method页中的“Select an input method”下拉框中选择增加Chinese C Pinyin,就是图标中有个一个大大的“拼”字的那一个,然后点击Add按钮,最后通过Up按钮将该输入法移动到最上面。

系统重启后,通过Ctrl + 空格即可调出ibus输入法。

2.3.3  安装sougou词库

下载http://code.google.com/p/hslinuxextra/downloads/list的sougou-phrases-full.7z

解压后的Andriod.db移动到/usr/share/pinyin-database

将原来的main.db改 名,然后将Andriod.db改名为main.db,注销重进系统就行了,成功标志,能打出:弗雷德霍姆行列式

2.4  安装编译环境

安装gcc g++ make等等

sudo apt-get install build-essential

2.5  安装gvim

2.5.1  安装vimgdb进行调试

若要安装vimgdb需重新编译安装vim,请参考以下网址

http://wiki.ubuntu.org.cn/%E8%80%81%E6%97%A7%E6%96%87%E7%AB%A0/Gvim%E7%9A%84%E5%AE%89%E8%A3%85%E5%8F%8A%E9%85%8D%E7%BD%AE

编译安装vim一定记得要先安装编译vim-gtk的依赖包

sudo apt-get build-dep vim-gtk

2.5.2  安装ctags

tar -xzvf   ctags.xxxxxx

./configure    –prefix= 安装的目录

make

sudo make install

ctags   –version 测试是否安装成功

或者执行下面的命令:

sudo apt-get install exuberant-ctags

2.5.3  添加gvim 启动项

sudo cat > /usr/share/applications/gvim.desktop <

[Desktop Entry]

Name=Gvim

Comment[zh_CN]=Gvim编辑器

Exec=gvim

Icon=/usr/share/pixmaps/gnome-word.png

Terminal=false

X-MultipleArgs=false

Type=Application

Categories=Application;Development;

Encoding=UTF-8

StartupNotify=true

2.5.4  编译gvim 后忽略错误警报

alias gvim=”gvim -reverse 2>/dev/null”

alias tvim=’gvim –remote-tab-silent’2.5.5  把gvim打造成IDE2.5.6  .vimrc配置文件

cp /usr/share/vim/vim72/vimrc_example.vim ~/.vimrc

vim ~/.vimrc

在文件末尾增加以下内容:

”by djk 2010.9.22 for Ubuntu 10.04

” 编辑设置

set number

set cursorline

set tabstop=4

set sw=4

set expandtab

set autoindent

set cindent

set nobackup

set nowritebackup

set showmatch

set statusline=%

set laststatus=2

syntax enable

syntax on

:match DiffAdd ‘\%>80v.*’

colorscheme desert

” 括号自动补全

inoremap [ []:let leavechar=”]”i

inoremap { {o}:let leavechar=”}”O

” 设置代码折叠

set foldcolumn=0

set foldmethod=indent

set foldlevel=3

” 设置字体

“set guifont=Bitstream_Vera_Sans_Mono:h12:cANSI

“set gfw=Yahei_Mono:h10.5:cGB2312

” 解决中文编码问题

let &termencoding=&encoding

set fileencodings=utf-8,gbk,ucs-bom,cp936

” 进行版权声名 按F4进行添加和更新

map  ms:call TitleDet()’s

function AddTitle()

call append(0,”/*====================================================”)

call append(1,”#”)

call append(2,”# Author: JK David – “)

call append(3,”#”)

call append(4,”# Last modified: “.strftime(“%Y-%m-%d %H:%M”))

call append(5,”#”)

call append(6,”# Filename: “.expand(“%:t”))

call append(7,”#”)

call append(8,”# Description: “)

call append(9,”#”)

call append(10,”====================================================*/”)

echohl WarningMsg | echo “Successful in adding the copyright.” | echohl None

endf

function UpdateTitle()

normal m’

execute ‘/# *Last modified:/s@:.*$@\=strftime(“: %Y-%m-%d %H:%M”)@’

normal ”

normal mk

execute ‘/# *Filename:/s@:.*$@\=”: “.expand(“%:t”)@’

execute “noh”

normal ‘k

echohl WarningMsg | echo “Successful in updating the copy right.” | echohl None

endfunction

function TitleDet()

let n=1

while n 

let line = getline(n)

if line =~ ‘^\#\s*\S*Last\smodified:\S*.*$’

call UpdateTitle()

return

endif

let n=n+1

endwhile

call AddTitle()

endfunction

” 编译运行程序

if(has(“win32″) || has(“win95″) || has(“win64″) || has(“win16″))

let g:iswindows=1

else

let g:iswindows=0

endif

”F5单个文件编译

map  :call Do_OneFileMake()

function Do_OneFileMake()

exec “w”

if expand(“%:p:h”)!=getcwd()

echohl WarningMsg | echo “Fail to make! This file is not in the current dir! Press  to redirect to the dir of this file.” | echohl None

return

endif

let sourcefileename=expand(“%:t”)

if (sourcefileename==”" || (&filetype!=”cpp” && &filetype!=”c”))

echohl WarningMsg | echo “Fail to make! Please select the right file!” | echohl None

return

endif

let deletedspacefilename=substitute(sourcefileename,’ ‘,”,’g')

if strlen(deletedspacefilename)!=strlen(sourcefileename)

echohl WarningMsg | echo “Fail to make! Please delete the spaces in the filename!” | echohl None

return

endif

if &filetype==”c”

if g:iswindows==1

set makeprg=gcc\ -o\ %<.exe>

else

set makeprg=gcc\ -o\ %

endif

elseif &filetype==”cpp”

if g:iswindows==1

set makeprg=g++\ -o\ %<.exe>

else

set makeprg=g++\ -o\ %

endif

“elseif  &filetype==”cs”

“set makeprg=csc\ \/nologo\ \/out:%<.exe>

endif

if(g:iswindows==1)

let outfilename=substitute(sourcefileename,’\(\.[^.]*\)$’,’.exe’,'g’)

let toexename=outfilename

else

let outfilename=substitute(sourcefileename,’\(\.[^.]*\)$’,”,’g')let toexename=outfilename

endif

if filereadable(outfilename)

if(g:iswindows==1)

let outdeletedsuccess=delete(getcwd().”\\”.outfilename)

else

let outdeletedsuccess=delete(“./”.outfilename)

endif

if(outdeletedsuccess!=0)

set makeprg=make

echohl WarningMsg | echo “Fail to make! I cannot delete the “.outfilename | echohl None

return

endif

endif

execute “silent make”

set makeprg=make

execute “normal :”

if filereadable(outfilename)

if(g:iswindows==1)

execute “!”.toexename

else

execute “!./”.toexename

endif

endif

execute “copen”

endfunction

“进行make的设置

map  :call Do_make()

map  :silent make clean

function Do_make()

set makeprg=make

execute “silent make”

execute “copen”

endfunction

”F2显示或隐藏菜单栏和工具栏

set guioptions-=m

set guioptions-=T

map   :if &guioptions =~# ‘T’ 

\set guioptions-=T 

\set guioptions-=m 

\else 

\set guioptions+=T 

\set guioptions+=m 

\endif

”ctrl+F12 更新tags文件

set tags=tags

au FileType cpp,c set tags+=~/.vim/stl_tags

set autochdir

map  :!ctags -R –c++-kinds=+p –fields=+iaS –extra=+q .

”————–

” 插件管理

”————–

”taglist.vim

”:Tlist open taglist window

let Tlist_Show_One_File=1

let Tlist_Exit_OnlyWindow=1

let Tlist_Use_Right_Window=1

let Tlist_Sort_Type=”name”

let Tlist_File_Fold_Auto_Close=1

let Tlist_Auto_Open = 0

let Tlist_Auto_Update = 1

let Tlist_Hightlight_Tag_On_BufEnter = 1

let Tlist_Enable_Fold_Column = 0

let Tlist_Process_File_Always = 1

let Tlist_Display_Prototype = 0

let Tlist_Compact_Format = 1

”command wm show fileexplorer window and taglist window

let g:winManagerWindowLayout=’FileExplorer|TagList’

nmap wm :WMToggle

”a.vim

”exchange head file and source file

”:A 打开源文件和头文件

”:AV 打开源文件和头文件并分屏

”grep.vim

”press F3 to search

nnoremap   :Grep

”auto completion

filetype plugin indent on

set completeopt=longest,menu

”omnicppcomplete

let OmniCpp_DefaultNamespaces = ["std"]

let OmniCpp_GlobalScopeSearch = 0

let OmniCpp_NamespaceSearch = 1

let OmniCpp_DisplayMode = 1

let OmniCpp_ShowScopeInAbbr = 0

let OmniCpp_ShowPrototypeInAbbr = 1

let OmniCpp_ShowAccess = 1

let OmniCpp_MayCompleteDot = 1

let OmniCpp_MayCompleteArrow = 1

”NERD_commenter.vim

” 按下一次ctrl+h是注释,再按下一次是取消注释

”[count],cc 光标以下count行逐行添加注释(7,cc)

”[count],cu 光标以下count行逐行取消注释(7,cu)

”[count],cm 光标以下count行尝试添加块注释(7,cm)

”,cA 在行尾插入/* */,并且进入插入模式

let NERDShutUp=1

map  ,c

”shell.vim www.2cto.com

”press F11 to fullscreen

”press F6 to open files directories urls and email under the cursor”

”snipmate

let snippets_dir=’/home/djk/.vim/snippets’

”crefvim

”press \cr to invoke C-reference

”stlrefvim

”place the cursor over the function

”press \tr to go to the documentation for it

”press \te to go to an example that uses this function

2.5.7  gvim以tab方式打开新文件

gvim   –remote-tab-silent  filename

为了方便可以在.bashrc中加入

alias vim=’gvim –remote-tab-silent’

alias gvim=’gvim –remote-tab-silent’

2.6  安装翻译软件stardict

sudo apt-get install stardict

词典选择

词典下载地址

将下载的词典放在一个目录下,进入该目录,输入以下命令可以一次性安装所有词典:

for i in stardict*.tar.bz2; do sudo tar xjvf “$i”-C /usr/share/stardict/dic/; done2.7  安装openfetion

使用飞信免费发短信,现在也可以使用webfetion了

安装库

apt-get install libxml2-dev

sudo apt-get install libgtk2.0-dev

sudo apt-get install libssl-dev

sudo apt-get install libnotify-dev

sudo apt-get install libgstreamer0.10-dev

sudo apt-get install intltool

下载openfetion源码,进入src目录,执行以下命令

./configure

make

sudo make install

在/etc/ld.so.conf 中另起一行添加/usr/local/lib

之后运行以下命令即可

sudo ldconfig

2.8  安装smplayer

media播放器

sudo apt-get install smplayer

2.9安装ubuntu 软件中心

apt-get install software-center

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值