# Debugfs

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Debugfs
> Markdown URL: https://mediated.wiki/source/Debugfs.md
> Source: https://en.wikipedia.org/wiki/Debugfs
> Source revision: 1282454666
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

RAM-based Linux file system

For the ext file system debugger, see [e2fsprogs](/source/E2fsprogs).

**debugfs** is a special file system available in the [Linux kernel](/source/Linux_kernel) since version 2.6.10-rc3.[1] It was written by [Greg Kroah-Hartman](/source/Greg_Kroah-Hartman).[2]

debugfs is a simple-to-use RAM-based file system specially designed for debugging purposes. It exists as a simple way for kernel developers to make information available to user space.[3] Unlike /proc, which is only meant for information about a process, or [sysfs](/source/Sysfs), which has strict one-value-per-file rules, debugfs has no rules at all. Developers can put any information they want there.[4]

## Use

To compile a Linux kernel with the debugfs facility, the CONFIG_DEBUG_FS option must be set to yes. It is typically mounted at /sys/kernel/debug with a command such as:[5]

mount -t debugfs none /sys/kernel/debug

It can be manipulated using several calls from the C [header file](/source/Header_file) linux/debugfs.h, which include:

- debugfs_create_file – for creating a file in the debug filesystem.

- debugfs_create_dir – for creating a directory inside the debug filesystem.

- debugfs_create_symlink – for creating a symbolic link inside the debug filesystem.

- debugfs_remove – for removing a debugfs entry from the debug filesystem.

## References

1. **[^](#cite_ref-intro_1-0)** [Linux: DebugFS](http://kerneltrap.org/node/4394) [Archived](https://web.archive.org/web/20100201234857/http://kerneltrap.org/node/4394) 2010-02-01 at the [Wayback Machine](/source/Wayback_Machine), by Jeremy, December 11, 2004, KernelTrap. (Announcement of debugfs by Greg KH.)

1. **[^](#cite_ref-creator_2-0)** ["Debugfs"](https://lwn.net/Articles/115405/). [LWN.net](/source/LWN.net). 2004-12-13.

1. **[^](#cite_ref-intro-2_3-0)** [Linux Kernel Documentation :: filesystems : debugfs.txt](http://www.mjmwired.net/kernel/Documentation/filesystems/debugfs.txt) documentation from the source code (Based on kernel version 2.6.35.4. Page generated on 2010-09-02 21:39 EST.)

1. **[^](#cite_ref-rules_4-0)** [An updated guide to debugfs](https://lwn.net/Articles/334546/), By Jonathan Corbet, May 25, 2009, LWN

1. **[^](#cite_ref-5)** [2.5 Debugfs](https://web.archive.org/web/20160105144119/http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html#ss2.5) A guide to using debugfs, Ariane Keller, Version 0.8, July 2008, Kernel Space - User Space Interfaces

## External links

- [An updated guide to debugfs](https://lwn.net/Articles/334546/) at [LWN](/source/LWN.net)

v t e Linux Linux kernel History Linus's law Linux-libre Booting process Kernel oops Tux more… Controversies Criticism of Linux Criticism of desktop Linux GNU/Linux naming controversy Tanenbaum–Torvalds debate SCO and Linux Distributions General comparison Distributions list Netbook-specific comparison Distributions that run from RAM Lightweight Security-focused operating system Package manager Package format List of software package managers Organizations LinuxChix Linux Counter Linux Documentation Project Linux Foundation Linux Mark Institute Linux User Group (LUG) Adoption Adopters Desktop Embedded Gaming Mobile Range of use State/government-sponsored Linux malware Media DistroWatch Free Software Magazine Full Circle Linux.com Linux Format Linux Gazette Linux Journal Linux Magazine LinuxUser Ubuntu User Linux Outlaws Linux Voice LugRadio LWN.net Phoronix Revolution OS The Code Security certifications CompTIA Linux+ Linux Foundation Red Hat Linux portal Free and open-source software portal Category

v t e Linux kernel Organization Kernel Linux Foundation Linux Mark Institute Linus's law Tanenbaum–Torvalds debate Tux SCO disputes Linaro GNU GPL v2 menuconfig Supported computer architectures Version history Criticism Support Developers The Linux Programming Interface kernel.org LKML Linux conferences Users Linux User Group (LUG) People Werner Almesberger H. Peter Anvin Jens Axboe Moshe Bar Suparna Bhattacharya Andries Brouwer Rémy Card Alan Cox Matthew Garrett Avi Kivity Con Kolivas Greg Kroah-Hartman Robert Love David S. Miller Ingo Molnár Andrew Morton Hans Reiser Rusty Russell Shuah Khan Linus Torvalds Theodore Ts'o Stephen Tweedie Harald Welte Chris Wright Technical Debugging CRIU ftrace kdump Linux kernel oops SystemTap BPF eBPF Startup vmlinux System.map dracut initrd initramfs ABIs Linux Standard Base x32 ABI APIs Kernel System Call Interface POSIX ioctl select open read close sync … Linux-only futex epoll splice dnotify inotify readahead … In-kernel ALSA Crypto API io_uring DRM kernfs Memory barrier New API RCU Video4Linux IIO Userspace Daemons, File systems bpffs configfs devfs devpts debugfs FUSE hugetlbfs pipefs procfs securityfs sockfs sysfs tmpfs systemd udev Kmscon binfmt_misc Wrapper libraries C standard library glibc uClibc Bionic libhybris dietlibc EGLIBC klibc musl Newlib libcgroup libdrm libalsa libevdev libusb liburing Components Kernel modules BlueZ cgroups Console bcache Device mapper dm-cache dm-crypt DRM EDAC evdev Kernel same-page merging (KSM) LIO Framebuffer LVM KMS driver Netfilter Netlink nftables Network scheduler perf SLUB zram zswap Process and I/O schedulers: Brain Fuck Scheduler Completely Fair Scheduler (CFS) Earliest eligible virtual deadline first (EEVDF) Noop scheduler O(n) scheduler O(1) scheduler SCHED_DEADLINE SCHED_FIFO SCHED_RR Security Modules: AppArmor Exec Shield seccomp SELinux Smack Tomoyo Linux Linux PAM Device drivers 802.11 graphics Raw device initramfs KernelCare kexec kGraft kpatch Ksplice Variants Mainline Linux kernel Linux-libre High-performance computing INK Compute Node Linux SLURM Real-time computing RTLinux RTAI Xenomai PREEMPT_RT MMU-less μClinux PSXLinux Virtualization Hypervisor KVM Xen OS-level virtualization Linux-VServer Lguest LXC OpenVZ Other L4Linux User-mode Linux MkLinux coLinux Adoption Range of use Desktop Embedded Gaming Thin client: LTSP Server: LAMP LYME-LYCE Devices Adopters List of Linux adopters Linux portal Free and open-source software portal Category

---
Adapted from the Wikipedia article [Debugfs](https://en.wikipedia.org/wiki/Debugfs) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Debugfs?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
