How to add a new user on Linux and some other useful tips.

Adding a new user on Linux is very easy, this can be done with the groupadd and useradd commands. I am adding a new user group to Linux and then adding the new user to it. Firstly, add the new user group. jason@jason-Lenovo-H50-55:~$ sudo groupadd -g 1001 cudauserjason@jason-Lenovo-H50-55:~$ sudo groupadd -g 1001 cudauser Then we … Read more

Interesting and useful commands available using the BASH shell on Linux.

This is an interesting command to view your command history when you are using Bash. ┌──[[email protected]]─[~] └──╼ ╼ $ hash hits command 1 /usr/bin/gethostip 1 /usr/bin/sudo┌──[[email protected]]─[~] └──╼ ╼ $ hash hits command 1 /usr/bin/gethostip 1 /usr/bin/sudo This command is a Bash shell built-in command. If you are using the tcsh or zsh shells; this command … Read more

How to add a Red Hat Linux 7.2 subscription after installation.

To add a subscription after installing Red Hat Enterprise Linux 7.2, type this command as root. [root@localhost jason]# subscription-manager register –username USERNAME –password "PASSWORD"[root@localhost jason]# subscription-manager register –username USERNAME –password "PASSWORD" This will setup your Red Hat subscription. Then enter this command. This will refresh all of the information on your machine. [root@localhost jason]# subscription-manager … Read more

Create a new group on Linux and add a new user to it easily.

To add a new group to a Linux system, enter this command as root. root@neo:/home/jason# groupadd deptroot@neo:/home/jason# groupadd dept Then, create our new user with this command. root@neo:/home/jason# useradd -m -g dept -d /home/user -s /bin/bash userroot@neo:/home/jason# useradd -m -g dept -d /home/user -s /bin/bash user Now our user is a member of the dept … Read more

How to create a new user on Linux and add a password in one go.

The useradd command can create a new user on your Linux system. Here is how to add a password as well all in one simple operation. root@neo:/home/jason# useradd -m -s /bin/bash -g users -p $(openssl passwd -1 ff302) randycoleroot@neo:/home/jason# useradd -m -s /bin/bash -g users -p $(openssl passwd -1 ff302) randycole This is a good … Read more

How to add a new user in Linux and some other useful networking commands.

This is the sequence of events when you are creating a new user. Use the sudo adduser jsmith command to add a new user named jsmith. After that, you can type other information to identify your user and then set a password to secure their account. jason@Yog-Sothoth:~$ sudo adduser jsmith Adding user `jsmith’ … Adding … Read more

How to add a swapfile with Linux and thoughts on the Die Hard 4.0 movie.

To create a new swapfile on your Linux machine to complement the existing /swap partition; the dd command will come in handy. This command will create the swap file as a loopback filesystem. adeptus-mechanicus ~ # dd if=/dev/zero of=swapfile bs=1024 count=524288adeptus-mechanicus ~ # dd if=/dev/zero of=swapfile bs=1024 count=524288 This command will make the filesystem a … Read more

How to put line numbers on the output of a command and other useful Linux commands.

If you want to put line numbers in the output of a command; then feed it through the nl command. This will put the required line numbers there for you. [john@deusexmachina]:~/Desktop> ls -hula | nl 1 total 452K 2 drwxr-xr-x 3 john john 4.0K Nov 14 10:46 . 3 drwxr-xr-x 46 john john 4.0K Nov … Read more

Adding Adsense advertisements to a Pagelines WordPress theme.

The Pagelines Framework theme is an outstanding theme for the WordPress blogging software, and adding Adsense ad units is a good way to monetise your website. If you edit the wp-content/themes/pagelines/sections/content/section.php you may add an Adsense ad unit very easily. There are plugins for WordPress that allow you to add Adsense ads to your blog, … Read more