随笔分类 -  Basic operation of Linux

some utility about linux .
fedora 16安装ByPass四网口网卡遇到的问题
摘要:这个问题困扰了好几天,今天终于在大谷歌的帮助下,在这个网站http://blog.bwysystems.com/bwysystems/?p=16上找到了答案!还是国外的技术论坛强,在百度上搜遍了也没有找到这篇文章,下面简单叙述整个安装过程。1. 安装e1000e驱动。1. Move the base driver tar file to the directory of your choice. For example, use /home/username/e1000e or /usr/local/src/e1000e.2. Untar/unzip archive: tar z... 阅读全文

posted @ 2013-07-26 10:56 净坛使者 阅读(987) 评论(0) 推荐(0)

Shell 脚本基本操作练习
摘要:这里主要是熟悉了shell的基本操作,包括变量赋值引用修改、函数的使用、信号的获取及一些判断方法等,具体详见代码:#!/bin/shstr="Hello World !"echo "${str}aha"#''echo '$str'#file nameecho "the name of this shell script is $0"#first parameter , $1---$Necho "the first parameter is $1"#all of the paramet 阅读全文

posted @ 2013-07-19 16:30 净坛使者 阅读(835) 评论(0) 推荐(1)

Unix 环境高级编程---线程创建、同步、
摘要:一下代码主要实现了linux下线程创建的基本方法,这些都是使用默认属性的。以后有机会再探讨自定义属性的情况。主要是为了练习三种基本的线程同步方法:互斥、读写锁以及条件变量。#include #include #include #include int g_count = 0;pthread_mutex_t mutex_lock;pthread_rwlock_t rw_lock;pthread_cond_t con_val = PTHREAD_COND_INITIALIZER;typedef enum { MutexLock = 0, RWLock, CondLock}Lock... 阅读全文

posted @ 2013-07-19 13:42 净坛使者 阅读(795) 评论(2) 推荐(0)

ubuntu 安装ssh-server时出现错误:openssh-server: Depends: openssh-client (= 1:5.3p1-3ubuntu3) but 1:5.3p1-3ubuntu4 is to be installed
摘要:错误如下:tiger@ubuntu:~/Desktop/work$ sudo apt-get install openssh-server [sudo] password for tiger: Reading package lists... DoneBuilding dependency tree Reading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you a... 阅读全文

posted @ 2013-07-12 09:51 净坛使者 阅读(8482) 评论(0) 推荐(0)

Ubuntu下gdb远程调试--warning: Could not load vsyscall page because no executable was specified解决方案
摘要:1. 首先安装gdbserverapt-get install gdbserver2. 编译-g 程序gcc -g test_gdb.c -o test_gdb源码如下:#include "Util.h"void p1(){ int j = 0; char *p; *p = '5'; printf("%p %c",p,*p); do { j++; }while(j This is free software: you are free to change and redistribute it.There is NO WARRA... 阅读全文

posted @ 2013-07-09 17:24 净坛使者 阅读(2823) 评论(0) 推荐(0)

Fedora 16设置开机自启动程序与Ubuntu的区别
摘要:Ubuntu设置开机自启动脚本的方法是:修改/etc/init.d/rc.local这个文件,添加需要启动的程序即可,相关函数如下:void SetSysAutoBoot(){ char path[256] = {0}; int ret = 0; ret = readlink("/proc/self/exe",path,sizeof(path)); if((ret > 0 )&& (ret > /etc/init.d/rc.local\n",path); printf(buf); system(buf); } free(b... 阅读全文

posted @ 2013-07-05 11:28 净坛使者 阅读(1605) 评论(0) 推荐(0)

Ubuntu下实用命令收集 --新增 删除 环境变量
摘要:1. 关闭防火墙:sudo ufw disable2. 设置IPV4地址和网关:ifconfig eth0 up %s netmask %sroute del default gw 192.168.110.1 eth0route add default gw %s eth03. 设置IPV6地址和网关:ip -6 addr add %s/%s dev eth0ip -6 route add ::/0 via %s dev eth0 //特别是这一条,网上很多都是写错的,只有这个是可以通过三层VLAN跨网段ping通的。正确的网址:http://ipv6.xjtu.edu.cn/conf/lin 阅读全文

posted @ 2013-06-25 12:35 净坛使者 阅读(750) 评论(0) 推荐(0)

导航