diff --git a/libc/Makefile b/libc/Makefile
index 08bb1296..b9b1f181 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -196,7 +196,6 @@ fsmarshall/fsm_mkserver.o \
fsmarshall/fsm_recv.o \
fsmarshall/fsm_send.o \
getc.o \
-gettermmode.o \
grp/grent.o \
init.o \
ioctl.o \
@@ -240,7 +239,6 @@ renameat.o \
rename.o \
scanf.o \
select.o \
-settermmode.o \
signal/kill.o \
signal/psignal.o \
signal/raise.o \
@@ -293,6 +291,8 @@ sys/stat/stat.o \
sys/stat/umask.o \
sys/stat/utimensat.o \
sys/stat/utimens.o \
+sys/termmode/gettermmode.o \
+sys/termmode/settermmode.o \
sys/time/gettimeofday.o \
sys/uio/preadv.o \
sys/uio/pwritev.o \
diff --git a/libc/gettermmode.cpp b/libc/sys/termmode/gettermmode.cpp
similarity index 97%
rename from libc/gettermmode.cpp
rename to libc/sys/termmode/gettermmode.cpp
index d38e919a..c5bed6e5 100644
--- a/libc/gettermmode.cpp
+++ b/libc/sys/termmode/gettermmode.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- gettermmode.cpp
+ sys/termmode/gettermmode.cpp
Gets the terminal modes.
*******************************************************************************/
diff --git a/libc/settermmode.cpp b/libc/sys/termmode/settermmode.cpp
similarity index 97%
rename from libc/settermmode.cpp
rename to libc/sys/termmode/settermmode.cpp
index 53a68137..d61ae275 100644
--- a/libc/settermmode.cpp
+++ b/libc/sys/termmode/settermmode.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- settermmode.cpp
+ sys/termmode/settermmode.cpp
Sets the terminal modes.
*******************************************************************************/