Well, my journey with Linux1 and Open source2 becoming quite astonish way of moving forward in life. I have been hugely influenced by the UNIX3 luminaries work and try to follow the principles they have established for the betterment. Sometimes, in fact, to follow that path requires pushing the limit of my everything(you guess the shortcoming in me, right?). But, I have realized, if I don’t do, I can not thrive as per my liking. So, I had to have the tenacity to get along with it.
Because I have attached with a particular platform for so long, it bound to be something in your kitty to show the world that you have come across. In this post, I will dish out some information I have gathered from various people and places (this is an absolute fraction and rudimentary, but it helps me), so it might hook you and to your journey with the echo system.
These are in no particular order, and I am giving a glance at my note file and writing it out for you. Try to connect these information, you need to put a lot of work to find out, which I intentionally left for you to get accustomed.
- In file system, the /dev partition4 is build in the fly, when kernel boots. And in that place, there resides so many files gather by the kernel. One of them is /dev/ttyS , which is needed for the serialized terminal consoles. This file gets created by the kernel config option CONFIG_SERIAL_8259_RUNTIME_UARTS.Well, you can told the kernel not to create it by passing a command line argument to the bootloader parameter 8250.nr_uarts=n
- Also, /dev is a special tmpfs as devtmpfs, that means it is on tmpfs , which doesn’t resides on any physical storage.
- There is a stark difference between initrd5 and initramfs . Which is, a initrd is a real filesystem and that is compressed. While initramfs is a cpio6 archive which is also compressed. Both of them, while in use, inflated inside RAM to assist kernel to get on with the booting.
- Logical working directory is a shell specific thing7. This is especially used to reached the current directory via symlnk8. Running cd.. removes the last component of the logical working directory. This is tricky and I encourage you to investigate further.9
- Big gotcha, use judiciously, aliases10 are process as shell input is read NOT as shell command executed.
- C11 strings are arrays of char, NOT arrays of unsigned char.
- unsigned char array …. strcpy12 requires a char pointer.Unsigned char and char are not the same thing.
8. The primary name of the zone is Etc/UTC. UTC13 is included in the timezone database for compatibility.
9. getchar14 only ever reads one character at a time, putchar15 only ever writes one character at a time.
10. GNU grep16 doesn’t use Perl17, it uses PCRE18.
11. Grep used Gnulib19‘s RE library.
12. X20 program receive events in order.It shouldn’t matter how much time elapses between the events.
13. Rsync21 only consider the last modification timestamp while checking destination, not last metadata change timestamp.
14. VFS22 is abstraction layer for all the filesystem in the Linux kernel.
15. Kernel tasks always are forked off PID23 2, kthreadd24
16. *ls* 25shows length of the file in size, whereas *du* 26shows the actual byte it took to reside there.
17. Signal27 number only go up to 64.
18. Assembly28 is really just about making machine code easier to read the write for human.
19. Your CPU is running program, it is reading machine code29, which is produced by human crafted assembly.
20. When you use30 bash -c the first argument after the command is assigned to $0 NOT S1.
21. Cron31 changes between UNIX system III32 and UNIX system V33
22. A mouse device reports relative positioning information whereas a touchscreen
or touchpad might report absolute positioning information.
23. POSIX34 doesn’t care how the system is implemented. It merely specifies a C API.
24. File creation time usually cannot be changed from userspace.35
25 ) When you press Ctrl+C, the terminal line discipline36 sends SIGINT to all processes in the terminal’s foreground process group that do not have the signal ignored. It is sent to processes where it is blocked, but it won’t do anything to that process unless and until that process unblocks it.
26. When you are raising your privileges to the superuser, su will always add SIGINT and SIGQUIT to its blocked signal mask. With that in place you don’t have to worry about them killing the su process itself.
The only time su37 keeps SIGINT38 and SIGQUIT39 unblocked are when you are dropping to an unprivileged user and using –command= (not –session-command=). That is when su uses the setsid(2) syscall, running the child process in a new session, and so it now has to propagate terminal signals into that session.
.png)
 1 day ago
                                1
                        1 day ago
                                1
                     
  

