CAlberca:
It is not a very odd thing to do, I just want to program a device that can work as a USB HID (so as a keyboard connected by arduino yun usb port) and do some commands in the terminal without watch anything in a display or something like that, because when I am programming I can check if the commands are correct or not.
Well, now you're changing the original requirements. In your first post (and this one) you keep using the term "terminal." That is an application that opens up a window, lets you type in commands to the command interpreter shell, and view the results of the command. The Yun doesn't have any way to view the results of the command that would be typed in from a USB keyboard, so the use of a "terminal" application doesn't make sense.
You are confusing the "terminal" (an application to access a command shell) with the command shell itself (the application that interprets and processes shell commands.) Forget "terminal." What you want is to send the keystrokes from the USB keyboard to a command interpreter shell for processing. I'm sure a Linux guru can come up with the appropriate command to launch a shell and redirect the keyboard input to that shell, and redirect the output to a NULL device so it is discarded/ignored.
But I'm still confused as to the practicality. The USB Rubber Ducky is designed to emulate keystrokes to a computer without having access to the internals of the computer. In fact, it is often used to exploit a vulnerability to gain such access to the computer's internals. But in this case, you already have to have access to the Yun's internals to enable the access from your device. If you're already there, it seems like it would be much easier to just write a shell script to accomplish what you are trying to do:
CAlberca:
I want to program the rubber ducky to automate some task in Linux environment (e.g. Check Software Updates or whatever) without using a LCD screen like other guys commented above.
That's exactly what shell scripts can do. Rather than write a script to enable the device to send commands to the Yun, and then program the device to send those commands, wouldn't it be a whole lot simpler to just put those commands into the shell script in the first place? Once you have the script written on the Yun, you can execute it manually at any time (through an SSH connection, or even triggered by a sketch.) Or it can run automatically on startup, or add it as a cron task and automatically run it periodically.
If you are doing this as a learning experience, so you can figure out how some of the Linux internals work, then go for it. But if you are doing this so you can automate a series of commands to run periodically, then there are much simpler (and more reliable) ways to do it.