Created
August 26, 2022 19:48
-
-
Save jsm222/d894e41172fbcc69e3c856dc6239fef5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/ioctl.h> | |
#include <unistd.h> | |
#include <sys/consio.h> | |
#include <fcntl.h> | |
int main() { | |
int fd = open("/dev/console", O_WRONLY | O_NOCTTY); | |
ioctl(fd,VT_ACTIVATE,3); | |
close(fd); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment