Information
The nodev mount option specifies that the filesystem cannot contain special devices.
Rationale:
Since the /tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /tmp.
Solution
Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount:
[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime,noexec,nodev,nosuid
Run the following commands to enable systemd /tmp mounting:
systemctl unmask tmp.mount
systemctl enable tmp.mount
Notes:
systemd includes the tmp.mount service which should be used instead of configuring /etc/fstab. Mounting options are configured in the Options setting in /etc/systemd/system/local-fs.target.wants/tmp.mount.