[W.I.P] NES/SNES Classic Commands List

Mnecraft368

I hate my name.
OP
Member
Joined
Aug 8, 2015
Messages
1,763
Trophies
0
XP
3,310
Country
United Kingdom
Hiya,

I have been looking through the kernel of the S/NES Classic and found the list of usable terminal commands in /bin/
I will post a WIP list of some commands and there uses and I would be grateful for anyone to contribute new commands and usage of some commands that are mostly untested.

ls - View Directory Contents
cd - Change Directory
mk/mkdir - Make a file/directory
rm/rmdir - Delete a file/directory
sh/script - Run a script
exec - Run a program/script?
test - Used in "if" statements to test if something is true or not. Runs low level tests. (Thanks to @cybrian)
test-menu - System Production Tests, can be executed
poweroff - Shutdown the system
gameover - Same as above
beep - Probably makes a beep sound, untested
reboot - Reboots the system. Can be achieved also with "kill 1"
cat - Probably views the contents of a file
kill - Kills something (probably processes) Only noticable effects with "kill 1" (see above)
pkill - Like kill but with a list of processes
killall - Kill proccesses with a name. Used in a init script. Mostly untested
gunzip - Compressing/Decompressing files
gzip - Above
lzop - Above
(I believe there are more compression tools in the system)
yes - Used to spam "y" in the terminal to quickly get through commands requiring a yes/no answer. (Thanks to @cybrian)
cp - Copy
xcopy - Copy
ifconfig - Would be used to display internet information but the classics dont have internet...
ping - Would be used to ping an ip/hostname but no internet connection
sleep - Timeout a program/terminal for a set amount of time
timeout - Similar to sleep
wget - Would be used for downloading programs but no internet
who - Lists all users on the system (Logged in users?)
whoami - Says what your user name is (More than likely root)
whois - Identifies a server (i think) but no internet
unzip - Doesnt need an explanation
time - Prints the time out, but every time the system reboots it starts from January 1970 due to Unix starting on that day
cal - Prints a calender but with the same issue as above
date - Same thing as above
su - Gives a user superuser access
printf - Can be used as a command but is more for scripts, Prints text to the screen.
echo - Prints text to the terminal
mount - Mounts something but gives an error when using
nanddump - Dumps nand
nandwrite - Writes to the nand?
halt - Shutsdown your system. In testing you need to unplug power to get out of it as power button is unresponsive and system is not detected by hakchi
free - Displays free space on the NAND
fdisk - This one made me laugh for some reason (old windows fanboy), anyway, Partition Manager.
eject - Attempts to eject a disc from a CD drive but fails (for obvious reasons)
clear - Probably clears the terminal screen
chmod - Not sure how to describe this one, google it
addgroup - Creates a user group (Admin, SuperUser, Regular User)
adduser - Does the same as addgroup I think.
busybox - This is the shell itself. Executing displays a list of commands. (Thanks to @cybrian)

The way I read the list of commands is usually opening filezilla and telnet side by side and going through some commands.

I have missed lots out in this list so I hope you can help me fill in some gaps!
Thanks for reading!
(Also I know this is kinda pointless but its still fun :D)
 
Last edited by Mnecraft368,
  • Like
Reactions: Magnus Hydra

cybrian

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
111
Trophies
1
XP
549
Country
United States
I recommend reading an introduction to Linux and maybe setting up a VM or something to futz around in. These are mostly standard Linux/Unix commands. In fact, the only ones that I noticed that aren’t normally included with ordinary Linux distributions are gameover, test-menu, nanddump, and nandwrite.

By the way, as far as what “yes” does, you’ve already discovered it: it spams ‘y’ on the terminal. It will spam something-else if you execute it as yes something-else
Why the hell would you want something like that? Well, it’s actually pretty simple: have you ever been asked repetitively on a command line/terminal to answer “yes” or “no” or some other choice? Ever want to just “give up” and tell it to fucking say yes to everything? That’s what yes is for. You “pipe” it to another command that would ask for affirmation like this: yes | command-that-needs-permission

From the manual page for “yes” on BSD Unix and Mac OS X (where I got it from):
man yes said:
YES(1) BSD General Commands Manual YES(1)

NAME
yes -- be repetitively affirmative

SYNOPSIS
yes [expletive]

DESCRIPTION
yes outputs expletive, or, by default, ``y'', forever.

HISTORY
The yes command appeared in 4.0BSD.

4th Berkeley Distribution June 6, 1993 4th Berkeley Distribution


Here’s some hints to help you explore:

busybox is the shell itself, and it’s also a single program that can handle multiple functions. The list of commands that it prints when you run the command busybox are its internal commands that it interprets itself.

test is also an internal command to the shell, but is not specific to busybox. Test is used for, well, performing “tests.” Low-level tests. Like checking a value, whether a quantity of time has passed, if a file exists, and so on. Test is aliased to be written as “[“ for ease of use. You’d use it in a shell script, in an if statement. See this page for how to use it.

And lastly, but most certainly not least, on a more-capable Linux system you can execute man command to get the manual/information for command. You can’t do this on the (S)NES Classic systems because most embedded systems are built without including help files — if you want to hack it, you probably already know where to get help from.

(Also I know this is kinda pointless but its still fun :D)
It’s not pointless if you learn from it. The (S)NES Classic is a great example of a well-engineered embedded Linux system. So is a “RetroPie” for that matter, as well as wireless routers and many, many other consumer electronic devices. It’s never, ever a bad thing to learn how to work with embedded Linux. The skills can transfer over to everything from software/hardware research & development to server administration. And if you ever want or need to make your own embedded Linux device (again, such as a RetroPie) it’s not bad to see how or why something was done a certain way.


By the way, the main thing Hakchi2 does is create and run shell scripts, bundling your ROMs with it. In fact, until CloverShell Hakchi2’s main operation was to upload a Linux kernel image over USB that contains scripts to download ROM files from your computer. I highly recommend against it (because the whole point of Hakchi is to do these things for you), but you can do almost everything that Hakchi will do automatically for you by hand using its CloverShell.
 
  • Like
Reactions: santamanga

CompCom

Active Member
Newcomer
Joined
Dec 12, 2013
Messages
37
Trophies
0
XP
219
Country
If you want to know what commands/programs are available on the NES/SNES mini just open your telnet and run:
ls /bin/
ls /usr/bin/
ls /sbin/
ls /usr/sbin/

Alternatively you can look in those folders using filezilla. As suggested above reading up on an introduction to Linux and playing around with Linux virtual machines can help you explore how the OS works. A lot of the commands will be common Linux/Unix commands and are found on most Linux distros.
 

Mnecraft368

I hate my name.
OP
Member
Joined
Aug 8, 2015
Messages
1,763
Trophies
0
XP
3,310
Country
United Kingdom
If you want to know what commands/programs are available on the NES/SNES mini just open your telnet and run:
ls /bin/
ls /usr/bin/
ls /sbin/
ls /usr/sbin/

Alternatively you can look in those folders using filezilla. As suggested above reading up on an introduction to Linux and playing around with Linux virtual machines can help you explore how the OS works. A lot of the commands will be common Linux/Unix commands and are found on most Linux distros.
Not exactly hard to notice... But mostly I use file zilla as it is easier to see in my opinion.

--------------------- MERGED ---------------------------

I recommend reading an introduction to Linux and maybe setting up a VM or something to futz around in. These are mostly standard Linux/Unix commands. In fact, the only ones that I noticed that aren’t normally included with ordinary Linux distributions are gameover, test-menu, nanddump, and nandwrite.

By the way, as far as what “yes” does, you’ve already discovered it: it spams ‘y’ on the terminal. It will spam something-else if you execute it as yes something-else
Why the hell would you want something like that? Well, it’s actually pretty simple: have you ever been asked repetitively on a command line/terminal to answer “yes” or “no” or some other choice? Ever want to just “give up” and tell it to fucking say yes to everything? That’s what yes is for. You “pipe” it to another command that would ask for affirmation like this: yes | command-that-needs-permission

From the manual page for “yes” on BSD Unix and Mac OS X (where I got it from):



Here’s some hints to help you explore:

busybox is the shell itself, and it’s also a single program that can handle multiple functions. The list of commands that it prints when you run the command busybox are its internal commands that it interprets itself.

test is also an internal command to the shell, but is not specific to busybox. Test is used for, well, performing “tests.” Low-level tests. Like checking a value, whether a quantity of time has passed, if a file exists, and so on. Test is aliased to be written as “[“ for ease of use. You’d use it in a shell script, in an if statement. See this page for how to use it.

And lastly, but most certainly not least, on a more-capable Linux system you can execute man command to get the manual/information for command. You can’t do this on the (S)NES Classic systems because most embedded systems are built without including help files — if you want to hack it, you probably already know where to get help from.


It’s not pointless if you learn from it. The (S)NES Classic is a great example of a well-engineered embedded Linux system. So is a “RetroPie” for that matter, as well as wireless routers and many, many other consumer electronic devices. It’s never, ever a bad thing to learn how to work with embedded Linux. The skills can transfer over to everything from software/hardware research & development to server administration. And if you ever want or need to make your own embedded Linux device (again, such as a RetroPie) it’s not bad to see how or why something was done a certain way.


By the way, the main thing Hakchi2 does is create and run shell scripts, bundling your ROMs with it. In fact, until CloverShell Hakchi2’s main operation was to upload a Linux kernel image over USB that contains scripts to download ROM files from your computer. I highly recommend against it (because the whole point of Hakchi is to do these things for you), but you can do almost everything that Hakchi will do automatically for you by hand using its CloverShell.
I don't often use Linux but I was aware of about a quarter of all the commands. I use a raspberry pi often and quite a few commands are the same. Thanks for explaining some commands. Will add the new descriptions in a moment.
 
Last edited by Mnecraft368,

CompCom

Active Member
Newcomer
Joined
Dec 12, 2013
Messages
37
Trophies
0
XP
219
Country
Not exactly hard to notice... But mostly I use file zilla as it is easier to see in my opinion.
Just thought I'd mention using the ls command so you can copy/paste the file list. Also a few commands on the mini will display their usage/description if you call them using the --help argument.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,287
Trophies
4
Location
Space
XP
13,845
Country
Norway
By the way, as far as what “yes” does, you’ve already discovered it: it spams ‘y’ on the terminal. It will spam something-else if you execute it as yes something-else
Why the hell would you want something like that? Well, it’s actually pretty simple: have you ever been asked repetitively on a command line/terminal to answer “yes” or “no” or some other choice? Ever want to just “give up” and tell it to fucking say yes to everything? That’s what yes is for. You “pipe” it to another command that would ask for affirmation like this: yes | command-that-needs-permission
Interesting, I never knew about that command.
Why didn't Homer use that in the episode where he got fatter so that he could work from home? :P
 
  • Like
Reactions: Mnecraft368

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @SylverReZ, lol +1