If udev service create /dev files then what is the need of mknod command?











up vote
0
down vote

favorite
1












Iam trying to understand mknod command, but got stuck here .In linux udev service detects devices connected to the linux machine ,then what is the need of the mknod command .please help..










share|improve this question






















  • And udev needn't work in containers, etc., so sometimes you need to create devices like /dev/null manually. Enter mknod.
    – muru
    Oct 17 '17 at 8:08










  • thank you for your reply .. By container do you mean lvm
    – Abhi balachandra
    Oct 18 '17 at 11:58










  • To create named pipes for instance.
    – Rinzwind
    Oct 18 '17 at 15:54










  • This is a comment to Abhi Balachandra, System Admin can use mknod command from the shell itself for required components.
    – Biju
    Nov 28 at 21:44















up vote
0
down vote

favorite
1












Iam trying to understand mknod command, but got stuck here .In linux udev service detects devices connected to the linux machine ,then what is the need of the mknod command .please help..










share|improve this question






















  • And udev needn't work in containers, etc., so sometimes you need to create devices like /dev/null manually. Enter mknod.
    – muru
    Oct 17 '17 at 8:08










  • thank you for your reply .. By container do you mean lvm
    – Abhi balachandra
    Oct 18 '17 at 11:58










  • To create named pipes for instance.
    – Rinzwind
    Oct 18 '17 at 15:54










  • This is a comment to Abhi Balachandra, System Admin can use mknod command from the shell itself for required components.
    – Biju
    Nov 28 at 21:44













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





Iam trying to understand mknod command, but got stuck here .In linux udev service detects devices connected to the linux machine ,then what is the need of the mknod command .please help..










share|improve this question













Iam trying to understand mknod command, but got stuck here .In linux udev service detects devices connected to the linux machine ,then what is the need of the mknod command .please help..







udev






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 17 '17 at 7:43









Abhi balachandra

63




63












  • And udev needn't work in containers, etc., so sometimes you need to create devices like /dev/null manually. Enter mknod.
    – muru
    Oct 17 '17 at 8:08










  • thank you for your reply .. By container do you mean lvm
    – Abhi balachandra
    Oct 18 '17 at 11:58










  • To create named pipes for instance.
    – Rinzwind
    Oct 18 '17 at 15:54










  • This is a comment to Abhi Balachandra, System Admin can use mknod command from the shell itself for required components.
    – Biju
    Nov 28 at 21:44


















  • And udev needn't work in containers, etc., so sometimes you need to create devices like /dev/null manually. Enter mknod.
    – muru
    Oct 17 '17 at 8:08










  • thank you for your reply .. By container do you mean lvm
    – Abhi balachandra
    Oct 18 '17 at 11:58










  • To create named pipes for instance.
    – Rinzwind
    Oct 18 '17 at 15:54










  • This is a comment to Abhi Balachandra, System Admin can use mknod command from the shell itself for required components.
    – Biju
    Nov 28 at 21:44
















And udev needn't work in containers, etc., so sometimes you need to create devices like /dev/null manually. Enter mknod.
– muru
Oct 17 '17 at 8:08




And udev needn't work in containers, etc., so sometimes you need to create devices like /dev/null manually. Enter mknod.
– muru
Oct 17 '17 at 8:08












thank you for your reply .. By container do you mean lvm
– Abhi balachandra
Oct 18 '17 at 11:58




thank you for your reply .. By container do you mean lvm
– Abhi balachandra
Oct 18 '17 at 11:58












To create named pipes for instance.
– Rinzwind
Oct 18 '17 at 15:54




To create named pipes for instance.
– Rinzwind
Oct 18 '17 at 15:54












This is a comment to Abhi Balachandra, System Admin can use mknod command from the shell itself for required components.
– Biju
Nov 28 at 21:44




This is a comment to Abhi Balachandra, System Admin can use mknod command from the shell itself for required components.
– Biju
Nov 28 at 21:44










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Udev is a subsystem used to automate hardware configuration while mknod is a tool to create special files as defined by POSIX primarily FIFOs. Although much of its functionality has been superseded by other tools like mkfifo. It's there for compatibility.



Edit: Alright lets provide more context. mknod is a Unix sys call as well its a command that impliments some of the functionality of that sys call. The sys call makes file "nodes" of any type including regular files. It's how the kernel makes every file node.



The command mknod is primarily able to make FIFOs and device files. In POSIX mknod command is so that device files can be hooked up to device drivers. POSIX also defines mkfifo as a more specific command for FIFOs. It can not be used to make regular files or UNIX socket files.



Since udev handles loading drivers and creating these device files system admins don't really need to make them using mknod. This is a feature of automation provided in Linux while a "Unix-like" system still maintains the ability to use mknod. Further a non-POSIX function makedev can also be used to make device files. This is the underlying syscall Linux uses to setup devices and the respective command can be used in place of mknod.






share|improve this answer























  • Thank you for you reply ..can you please explain what is the necessity of mknod command for system admins .
    – Abhi balachandra
    Oct 18 '17 at 12:33











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f965663%2fif-udev-service-create-dev-files-then-what-is-the-need-of-mknod-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Udev is a subsystem used to automate hardware configuration while mknod is a tool to create special files as defined by POSIX primarily FIFOs. Although much of its functionality has been superseded by other tools like mkfifo. It's there for compatibility.



Edit: Alright lets provide more context. mknod is a Unix sys call as well its a command that impliments some of the functionality of that sys call. The sys call makes file "nodes" of any type including regular files. It's how the kernel makes every file node.



The command mknod is primarily able to make FIFOs and device files. In POSIX mknod command is so that device files can be hooked up to device drivers. POSIX also defines mkfifo as a more specific command for FIFOs. It can not be used to make regular files or UNIX socket files.



Since udev handles loading drivers and creating these device files system admins don't really need to make them using mknod. This is a feature of automation provided in Linux while a "Unix-like" system still maintains the ability to use mknod. Further a non-POSIX function makedev can also be used to make device files. This is the underlying syscall Linux uses to setup devices and the respective command can be used in place of mknod.






share|improve this answer























  • Thank you for you reply ..can you please explain what is the necessity of mknod command for system admins .
    – Abhi balachandra
    Oct 18 '17 at 12:33















up vote
0
down vote













Udev is a subsystem used to automate hardware configuration while mknod is a tool to create special files as defined by POSIX primarily FIFOs. Although much of its functionality has been superseded by other tools like mkfifo. It's there for compatibility.



Edit: Alright lets provide more context. mknod is a Unix sys call as well its a command that impliments some of the functionality of that sys call. The sys call makes file "nodes" of any type including regular files. It's how the kernel makes every file node.



The command mknod is primarily able to make FIFOs and device files. In POSIX mknod command is so that device files can be hooked up to device drivers. POSIX also defines mkfifo as a more specific command for FIFOs. It can not be used to make regular files or UNIX socket files.



Since udev handles loading drivers and creating these device files system admins don't really need to make them using mknod. This is a feature of automation provided in Linux while a "Unix-like" system still maintains the ability to use mknod. Further a non-POSIX function makedev can also be used to make device files. This is the underlying syscall Linux uses to setup devices and the respective command can be used in place of mknod.






share|improve this answer























  • Thank you for you reply ..can you please explain what is the necessity of mknod command for system admins .
    – Abhi balachandra
    Oct 18 '17 at 12:33













up vote
0
down vote










up vote
0
down vote









Udev is a subsystem used to automate hardware configuration while mknod is a tool to create special files as defined by POSIX primarily FIFOs. Although much of its functionality has been superseded by other tools like mkfifo. It's there for compatibility.



Edit: Alright lets provide more context. mknod is a Unix sys call as well its a command that impliments some of the functionality of that sys call. The sys call makes file "nodes" of any type including regular files. It's how the kernel makes every file node.



The command mknod is primarily able to make FIFOs and device files. In POSIX mknod command is so that device files can be hooked up to device drivers. POSIX also defines mkfifo as a more specific command for FIFOs. It can not be used to make regular files or UNIX socket files.



Since udev handles loading drivers and creating these device files system admins don't really need to make them using mknod. This is a feature of automation provided in Linux while a "Unix-like" system still maintains the ability to use mknod. Further a non-POSIX function makedev can also be used to make device files. This is the underlying syscall Linux uses to setup devices and the respective command can be used in place of mknod.






share|improve this answer














Udev is a subsystem used to automate hardware configuration while mknod is a tool to create special files as defined by POSIX primarily FIFOs. Although much of its functionality has been superseded by other tools like mkfifo. It's there for compatibility.



Edit: Alright lets provide more context. mknod is a Unix sys call as well its a command that impliments some of the functionality of that sys call. The sys call makes file "nodes" of any type including regular files. It's how the kernel makes every file node.



The command mknod is primarily able to make FIFOs and device files. In POSIX mknod command is so that device files can be hooked up to device drivers. POSIX also defines mkfifo as a more specific command for FIFOs. It can not be used to make regular files or UNIX socket files.



Since udev handles loading drivers and creating these device files system admins don't really need to make them using mknod. This is a feature of automation provided in Linux while a "Unix-like" system still maintains the ability to use mknod. Further a non-POSIX function makedev can also be used to make device files. This is the underlying syscall Linux uses to setup devices and the respective command can be used in place of mknod.







share|improve this answer














share|improve this answer



share|improve this answer








edited Oct 18 '17 at 15:50

























answered Oct 17 '17 at 7:56









jdwolf

676210




676210












  • Thank you for you reply ..can you please explain what is the necessity of mknod command for system admins .
    – Abhi balachandra
    Oct 18 '17 at 12:33


















  • Thank you for you reply ..can you please explain what is the necessity of mknod command for system admins .
    – Abhi balachandra
    Oct 18 '17 at 12:33
















Thank you for you reply ..can you please explain what is the necessity of mknod command for system admins .
– Abhi balachandra
Oct 18 '17 at 12:33




Thank you for you reply ..can you please explain what is the necessity of mknod command for system admins .
– Abhi balachandra
Oct 18 '17 at 12:33


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f965663%2fif-udev-service-create-dev-files-then-what-is-the-need-of-mknod-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei