随笔分类 - Linux基础知识
摘要:1.什么是shell2. 还是hello world程序3. shell中的变量 3.1 系统变量 3.2 用户定义变量 3.2.1 用户定义变量规则 3.2.3 shell如何使用变量 3.2.3 全局变量 vs 局部变量4. shell编程中的控制结构 4.1 条件判定 4.1.1 简单条件判定 4.1.2 组合判定 4.2if - else 4.3 for 4.4 while 4.5 case5. shell中的函数 5.1 函数声明和定义 5.2 函数调用6. shell脚本调试 6.1 万能的echo 6.2两个命令7. 参考资料及shell脚本下载<1>. 什么是she
阅读全文
摘要:If you want to share files between your Ubuntu and Windows computers, your best option is to use Samba file sharing.To install, first open a terminal window and enter the following command:sudo apt-get install samba smbfsWe’ve got samba installed, but now we’ll need to configure
阅读全文
摘要:ubuntu自带的浏览器是firefox,还是习惯于google chrome的小巧和高效,那就装一个google chrome吧,很简单,首先到:http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb下载deb的包,双击安装即可。我已经把这个deb的包上传到csdn上,可以在我的doenload page中找到相应的下载包:http://xuqianghit.download.csdn.net/
阅读全文
摘要:今天,一个哥们的ubuntu系统启动时停止在grub阶段,我问他怎么回事?原来是wubi升级惹的祸啊。ubuntu是使用的是wubi来安装,另外的一个系统是windows 7,经过尝试,终于进入系统,同时修复了系统的grub,现将整个的过程记录如下:进入grub时的命令行,常用的命令包含如下:ls命令:查看电脑中安装的硬盘的情况set root = (hd0,8):如果不确定ubuntu安装盘的盘符的话,可以根据上面的ls命令来一个一个实验,设置完root之后,然后使用ls /命令来查看root下的文件目录,使用这个命令来查看相应的root盘。真个的过程如下:在 grub中键入下面的命令:se
阅读全文
摘要:liinux下安装xipmsg,本来很简单的问题,几个命令就能搞定的事情,结果却是稍微的麻烦点。首先在ubuntu中最简单的方法就是使用apt-get来安装xipmsgsudo apt-get install xipmsg另外的一种方法就是直接编译源码来实现,下载地址是http://www.ipmsg.org/index.html.en,在其中下载相应的文件,ls一下,没有configure文件,how ?最直接的方法就是直接读取REAME文件,果然在REAME中存在安装的说明。名儒如下:INSTALL (1) Edit Imakefile. - Enabe/Disable OS depend
阅读全文
摘要:由于修改了/etc/bash.bashrc时,将PATH变量中路径设置错误(路径拼写错误,呵呵,低级错误),所以当再次打开bash时,出现Command 'lesspipe' is available in '/usr/bin/lesspipe'The command could not be located because '/usr/bin' is not included in the PATH environment variable.bash: lesspipe: command not foundCommand 'dircol
阅读全文
摘要:虽说vim很强大,但是个人感觉器代码提示功能不如visual assist来的强大。如何使用visual assist来实现代码的提示功能呢?首先说明我的环境 : 宿主机是xp(O(∩_∩)O~还是xp的好使),虚拟机vmware + ubuntu 9.041.首先设置文件共享:安装vmware tools。安装笔记如下 : 将安装文件拷贝到/tmp路径下,解压,进入解压完的目录内,执行install文件。一路完全使用enter键,使用默认即可。2 将/usr/include目录下的文件拷贝到/mnt/hgfs/文件夹下。sudo cp -r /usr/include/ /mnt/hgfs3.
阅读全文
摘要:在 ubunut的系统中直接使用如下的命令即可实现:sudo apt-get install linux-source即可实现安装ubunut源码的需求。
阅读全文
摘要:1、NFS服务器端与客户端的安装:sudo apt-get install nfs-kernel-server nfs-common portmap2、配置portmap两种方法任选一种就可以:sudo emacs /etc/default/portmap去掉 -i 127.0.0.13、配置挂载目录和权限vim /etc/exports在该配置文件下加入:/home/nfsboot *(rw,sync)解释一下:4、更新exports文件sudo exportfs -r5、重启NFS服务sudo /etc/init.d/nfs-kernel-server restart 重启nfs服务6、进
阅读全文
摘要:经过千辛万苦的配置,终于在ubuntu上将tftp服务配置好,现将配置过程记录如下:1 安装#大部分网上说明将此处略去sudo apt-get install tftp tftpd openbsd-inetd#先安装这些,没有测试不安装的后果#如果按照下面的安装方法未能实现tftp服务,那么请安装下面的软件sudo apt-get install tftpd-hpa tftp-hpa2在根目录下建立目录 tftpbootcd /sudo mkdir /tftpboot3改变文件夹的属性sudo chmod 777tftpboot4修改配置文件修改文件/etc/inetd.confsudo vi
阅读全文
摘要:At first you have to open a terminal/bash and then enter:file /path/file.bin for example file /home/user/file.bin (file is the command)Now you should see a sentence including the word “executable” and not “non-executable, not executable,… or something complet
阅读全文
摘要:直接在X环境下停掉GDM服务: sudo update-rc.d -f gdm remove 重新启动(进入文字命令行模式): sudo reboot -n 如果想在命令行模式直接进入X环境的话,则需输入: startx 如果想改回开机启动回到X环境的话,则需开启GDM服务即可: sudo update-rc.d gdm defaults
阅读全文