The best way to create a new file with Linux is to use the touch(1) command. The touch command, when used on an existing file will update the file date stamp to the current system date. But if you type touch myfile.txt
this will create an empty file named myfile.txt if this file is not already present on the system. This is a good way to create a file for editing, rather than typing echo "" > myfile.txt
.
Printing the date with bash.
ubuntu ~ $ date +"%H:%M:%S, %A %d %B %Y" 17:33:24, Thursday 25 January 2018 |
How to login with the root account on Ubuntu 12.04.
You may do this by using the sudo command.
sudo su - |
This will give you a proper root prompt. Or you could set a password for the root account and then you may use the su command to switch to the root user. As shown in the example below.
john@deep-thought Documents $ sudo passwd root [sudo] password for john: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully john@deep-thought Documents $ su Password: root@deep-thought:/home/john/Documents# |
How to keep Ubuntu 12.04`s packages updated.
ubuntu ~ $ sudo apt-get update ; sudo apt-get upgrade |
Practicing Linux commands online.
Just visit this website: http://bellard.org/jslinux/ This site runs a Linux operating system with JavaScript, allowing anyone to practice Linux commands with any operating system. A very good idea too. Writing an entire PC emulator in JavaScript is no mean feat.
Yes, surely there could be a way to get that working, then you could have the shareware doom wad and anyone could play Doom episode 1. I have not heard anything about enhancing the Javascript emulator to be able to run sound or games, but still writing a whole x86 PC emulator in Javascript is pretty hardcore…
How amazing is that Javascript PC emulator!!!
Yes, I was on /g/ when someone posted about this and they were reverse engineering it to try and get Gentoo running with it but they were running into memory barriers. So running Xorg with this emulator seems to be out of the question. But this is a great learning tool. It even has gcc!
I’d love if he expanded it to have DOS support. Chuck in the OPL3 emulation from DOSBox and one could make the ultimate oldgames webpage.