Location of the filesystem that the Windows 10 bash shell uses.

This is the location of the actual files that are installed when you install the Windows 10 bash shell. This means that it is not really a ext4 filesystem, but emulating this when you load it up in a CMD window. %localappdata%\lxss\rootfs The location of the actual filesystem the Windows 10 bash shell uses. Very […]

Windows 10 bash shell not very impressive at all.

The new Windows 10 bash shell is not very impressive once you get it installed. I have tried it and I could not ping websites even though Microsoft Edge could access the Internet. It is possible to install packages if these lines are added to the /etc/hosts file. archive.ubuntu.com security.ubuntu.com But using ping […]

Windows 10 bash shell 10.0.14316 very good for getting system information.

The new bash shell in Windows 10 build 10.0.14316 is the best addition to Windows 10 yet. Here I am getting information about the CPU. [email protected]:/mnt/c/Users/johnc# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz stepping : 3 microcode : […]

Windows 10 getting a Linux shell.

Windows 10 is getting a bash shell in the summer release. This is a couple of months away. But here are a couple of screenshots from developers I have found on the web that show what this will look like. Here a person is installing the bash shell using CMD. Now this is the bash […]

Linux bash shell coming to Windows 10.

Apparently, the Linux bash shell is coming to Windows 10. This will offer a fully functional Linux bash prompt in the Windows app store, a good alternative to Powershell. This is in partnership with Canonical who work on the Ubuntu Linux distribution. As long as this offers tools such as dig, wget, and whois, it […]

Gnome Shell Linux interface in Justin Beiber music video.

This music video features a Macintosh iMac PC with the Gnome Shell Linux interface. This is used as the main screen where the girl is typing on a notepad and then ripping the pages off the screen. This is an interesting place to see the Gnome Shell Linux desktop environment. You would have thought that […]

How to generate a random password using the command line.

The shuf command for Linux allows a command-line user to select a given number of random words from a wordlist. [[email protected] ~]$ shuf -n 8 /usr/share/dict/words amphivasal thoracically U. bluet Dabih thioamid taxiing convictism This can be used to generate a word based password using piping. The example below shows how to generate a random […]

Some useful bash shell scripts for the Linux user.

This function will allow your computer to speak. function shellspeak() { mplayer "http://translate.google.com/translate_tts?tl=en&q=$(echo $@ | sed ‘s/\s/+/’)" > /dev/null 2>&1; } A script that will change all files in a directory to lowercase filenames. function lowercase() # move filenames to lowercase. { for file ; do filename=${file##*/} case "$filename" in */*) dirname==${file%/*} ;; *) dirname=.;; […]

How to send a message to logged on users on your Linux system with a simple command.

The wall command is a perfect way to send a message to all logged on users on a Linux machine. This is used when you shutdown to alert all users that the system will be shutting down. The example below shows me sending the output of the ps command to all users. [email protected]:~$ sudo ps […]

More useful bash tricks for navigating your filesystem.

To navigate back to the last directory you were in, type cd -. This will take you back to where you were before. The cd ~ command will take you back to your home directory. The user can also use the cd command by itself to go back to the home directory. Using cd .. […]

How to change the default shell for new users on your Ubuntu Linux system.

The useradd command is used to add new users on your Linux system. But it can be used for other things too. You may display the defaults for new users. jason-H55-USB3% sudo useradd -D GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/sh SKEL=/etc/skel CREATE_MAIL_SPOOL=no Use the -s parameter to useradd and this will change the default shell for […]

A variant of the shellshock bug that still works with the bash 4.3.11 shell.

This is a variant of the shellshock bug for bash that still works on a patched system. I am using Ubuntu 14.04 and this still works for me. env VAR1=’me() {echo "hello"}\ ‘ /bin/touch /home/$LOGNAME/my.text So you can still put arbitrary content after the function definition in a bash script. I have installed the latest […]

How to list all files in a directory that are larger than one megabyte.

Use this command to find all files in a directory that are larger than 1 megabyte. find . -maxdepth 1 -type f -size +1M -exec ls -Shal {} \+ | head Here is this command in practice. This is a very useful command. [email protected]:/boot$ find . -maxdepth 1 -type f -size +1M -exec ls -Shal […]

How to change the shell for a user on a Linux system easily with the usermod command.

I recently created a new user with the adduser command. [email protected]:~/Documents$ sudo adduser jimkirk Adding user `jimkirk’ … Adding new group `jimkirk’ (1002) … Adding new user `jimkirk’ (1002) with group `jimkirk’ … Creating home directory `/home/jimkirk’ … Copying files from `/etc/skel’ … Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully […]

How to print out a list of all BBC news headlines with the command line. This is very cool.

This simple one-liner will print out all of the news headlines from the BBC news website in a simple text format. This is useful if you want to do something with a list like this. Or if you just want a listing to see if there is anything interesting happening. [email protected]:~$ curl -s http://feeds.bbci.co.uk/news/rss.xml | […]

A useful script for gaining information about your Ethernet adapter.

This useful shell script will print information about your Ethernet or Wireless adapter. This is very useful for getting a lot of information at once. #!/bin/sh   DEV="eno16777736"   echo "Showing information for the active network interface: $DEV."   echo -e "-*- \e[1mGet timestamping information for your Ethernet device.\e[0m -*-" echo   ethtool -T $DEV […]

Some useful Linux scripts for the desktop Linux user who likes the command line.

There are many useful Linux tips that make the life of a Linux user much easier. One is for the VI or VIM editor. To open a file at a specific line; use this command. [email protected] ~/Documents/yadex-1.7.901 $ vim src/x11.h +33 This will open the file x11.h at line 33. How to ssh into a […]

How to copy files from one machine to another using SSH and the sftp command.

The sftp command allows a user to retrieve files on a remote machine and save them on their computer. Use this command to access the files: sftp -P 443 [email protected]:/home/homer/Downloads/*.pdf I have my SSH server running on port 443, so I need to specify that port when using this command. I am using Cygwin on […]

Useful shell script that may be used to create a whole host of user accounts easily.

This bash shell script is useful for creating a new user and setting a password for that user. This allows you to just type a username and password and everything else is done for you. Very useful for someone who is in a hurry. #!/bin/bash   echo "Type a username for your new account: " […]

How to use the touch command to create a file with an arbitrary filename.

The touch command ordinarily does not allow the user to create files with a filename like –rf, but if you want to really annoy someone then you may use this command to create one. [email protected]:~$ touch — ‘–rf ‘ And now you have a file named –rf. -rw-r–r– 1 homer homer 0 Jun 28 16:26 […]