I’m not sure if there’s any reason to choose one or the other, but the latter example is arguably easier to remember.
All color codes:
Reset color 0 Black 0;30 Blue 0;34 Green 0;32 Cyan 0;36 Red 0;31 Purple 0;35 Brown/Orange 0;33 Light Gray 0;37 Dark Gray 1;30 Light Blue 1;34 Light Green 1;32 Light Cyan 1;36 Light Red 1;31 Light Purple 1;35 Yellow 1;33 White 1;37
You can also do lots of other things in bash, such as blinking text, bold, etc. Take a look at this site for more examples.
If you like to create CLI tools, adding some colors will make it a lot more immersive and easier to read output, like this example:
This will run the command with admin-privileges on Linux, while on Windows it’ll simply run as the user provided (so you need to run as a user who has local administrator rights)
cat src1.js src2.js > compiled.js
type src1.js src2.js > compiled.js
Combine two or more files into one
Shows network information
Trace an address and show routes
net stats server or net stats workstation
Windows don’t have a builtin command to show uptime in days, but this command will show you when the machine was last booted (do the math)
Show directory contents
Show available RAM
I started on this article a couple years ago but was quickly forgotten in the drafts bin. Now I actually don’t have any Windows computers available anymore and can’t be arsed to look up more commands so this’ll have to work for now.
Some simple commands such as cd, mkdir, rm, rmdir has been ignored for now as they’re equal in both operating systems.
Please post a comment below if you know of any useful commands available on both operating systems.
I just upgraded from 18.04 to 18.10 yesterday, but to my dismay, the new fancy theme, Yaru, was nowhere to be found. Looked around in Gnome Tweaks to no avail. Turns out some of the theme packages were not properly installed, more specifically the yaru-theme-gtk package.
Enter the command apt search yaru-* to see installation status of every package containing “yaru-*”. If they are installed they will state [Installed] inside the square brackets, like so:
If they’re not installed, you can simply fix the issue by running sudo apt install yaru-*. Once complete, log out and back in, and the theme files will be available in Gnome Tweaks.
Voila! Remember to also set Cursor, Icons and Sound theme to Yaru in Gnome Tweaks if desired.