²é¿´linux ´íÎóÂëµÄ³ÌÐò
ΪÁË·½±ã²é¿´LinuxϵͳϵĴíÎóÂëÒÔ¼°ËüµÄº¬Ò壬дÁËÒ»¸ö³ÌÐòÀ´´òÓ¡ÕâЩÐÅÏ¢¡£
listerrno.c
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#define MAX_ERRNO 256
int main(int argc, char* argv[])
{
int n = 0;
printf("----------------------- Errno --------------------\n");
for(n=0; n < MAX_ERRNO; n++)
{
printf("#%d, %s\n", n, strerror(n));
}
printf("--------------------------------------------------\n");
return 0;
}
Makefile£º
E_TARGET = listerrno
all: $(E_TARGET)
listerrno:
gcc -o $@ listerrno.c
clean:
rm -rf $(E_TARGET) *.o
ÔÚRedhat Enterprise Linux 5 ÉϵĴòÓ¡½á¹û£º
----------------------- Errno --------------------
#0, Success
#1, Operation not permitted
#2, No such file or directory
#3, No such process
#4, Interrupted system call
#5, Input/output error
#6, No such device or address
#7, Argument list too long
#8, Exec format error
#9, Bad file descriptor
#10, No child processes
#11, Resource temporarily unavailable
#12, Cannot allocate memory
#13, Permission denied
#14, Bad address
#15, Block device required
#16, Device or resource busy
#17, File exists
#18, Invalid cross-device link
#19, No such device
#20, Not a directory
#21, Is a directory
#22, Invalid argument
#23, Too many open files in system
#24, Too many open files
#25, Inappropriate ioctl for device
#26, Text file busy
#27, File too large
#28, No space left on device
#29, Illegal seek
#30, Read-only file system
#31, Too many links
#32, Broken pipe
#33, Numerical argument out of domain
#34, Numerical result out of range
#35, Resource deadlock avoided
#36, File name too long
#37, No locks available
#38, Function not implemented
#39, Directory not empty
#40, Too many levels of symbolic links
#41, Unknown error 41
#42, No message of desired type
#43, Identifier removed
#44, Channel number out of range
#45, Level 2 not synchronized
#46, Level 3 halted
#47, Level 3 reset
Ïà¹ØÎĵµ£º
ÔÚlinuxÖÐËùÓеÄsyscall¶¼Êǵ÷ÓÃint 0x80, int 0x80µÄÖжϷþÎñ³ÌÐòΪsystem_call(arch/x86/kernel/traps_32.c:set_system_gate(SYSCALL_VECTOR,&system_call). system_call (arch/x86/entry_32.S)×îÖÕcall *sys_call_table(,%eax,4)À´Íê³ÉÒ»¸ösyscallµ÷ÓÃ.
¼´ int 0x80 -> system_call -> s ......
×î½üºÜÊÇÎÞÁÄ£¬°Ñ±¾±¾ÄóöÀ´»»¸öϵͳ»»¸öÐÄÇé¡£ÓÚÊǾö¶¨°ÑÔ½ÅÜÔ½ÂýµÄD°æXP»»µô¡£Õâ´ÎÏÂÔØÁËFEDORA 12 X64£¬×ÜÊÇÄÃË«ºË64λµÄCPUÀ´ÅÜ32λϵͳÒѾÈÃÎÒ²»Ë¬ºÜ¾ÃÁË¡£
ϵͳװºÃÁËÒÔºó·¢ÏÖÓе㲻¶Ô¾¢£¬£À £À
¶«Î÷ºÃ´ó¡£¿´À´ÊÇ·Ö±æÂʵÄÎÊÌ⣬ϵͳ£Ê×Ñ¡Ïî£ÏÔʾ......ºÃÏñ¸Ä²»ÁË.
PS:ÔÚlinuxÏÂÃæ²»×°ÏÔ¿¨ÊDz»ÄܸķֱæÂʵÄ
û° ......
ÍøÉÏÓкܶàµÄ·½·¨£¬¹ØÓÚÍü¼ÇlinuxµÇ¼ÃÜÂëÖ®ºóÓ¦¸ÃÔõô°ì¡£ÓÐÎåÖÖ·½·¨£¬¶¼ºÜºÃ¡£
±¾ÈËÒÔΪÓÃgrubÒýµ¼µÄÄÇÖÖ×îʵÓ㬺Ǻǣ¡ÊÔÁËһϣ¬¹ûÈ»¿ÉÒÔ£¡£¡
grubÒýµ¼
1. ÔÚ³öÏÖgrub»ÃæÊ±£¬Ñ¡ÔñlinuxÒýµ¼ÏȻºó°´e¼ü
2. Ñ¡ÔñÒÔkernel¿ªÍ·µÄÒ»ÐУ¬ÔÙ°´e ¼ü£¬ÔÚ´ËÐеÄĩ⣬°´¿Õ¸ñ¼üºóÊäÈësingle£¬ÒԻسµ¼üÀ´Í˳ö±à¼Ä£Ê½£» ......
linuxϹ¹½¨½¨ÉèÍêÃÀFTP·þÎñÆ÷£¬¿É¹ÜÀí£¬WEB¹ÜÀí£¬¹ÜÀí½çÃæ¡£
Ò»¡¢°²×°Ubuntu5 Desktop°æ
°²×°¹ý³Ì²»ÄÑ£¬ÒÀÕÕhttp://wiki.ubuntu.org.cn¿ìËÙÉèÖü´¿É,×¢ÒâÏÂÃæÁ½µã£º
1¡¢ÍøÍ¨Óû§ÇëÑ¡ÔñÉϺ£½»´óµÄÔ´£¬±È½Ï¿ì¡£
2¡¢ms·ÖÇøÏµÄÖÐÎÄĿ¼ÃûÏÔʾΪ£¿£¿£¿
Õâʱ£¬ÄãÒª±à¼/etc/fstab¡£±ÈÈçÎҵıʼDZ¾ÖеÄfstabÎļþ¸ÄºóÊÇ£º
# ......
1. xhost hostname Æô¶¯/Ìí¼ÓxwindowȨÏÞ,·ñÔò±¨´í
2. °²×°Oracle10g,Èç¹û²»ÉèÖÃORACLE_SID»òÕßûÓÐexport,µÇ¼ʱÌáʾORA-12162: TNS:net service name is incorrectly specified
3.groupadd
4.useradd -g groupname username
5.cat /etc/group ²é¿´Óû§×é
6.id usename ²é¿´Óû§×éµÈÊôÐÔ
7.Oracle 10g Æô¶¯ 1) lsnc ......