Resources, Articles, Tricks, and Solutions in connection to Linux

How Chmod 777 works

This article will guide you on how to give #Chmod 777 to folders and files in #Linux. We also discussed the risks and more information about file permissions. 

If you are managing a Linux system, it is crucial to know how the Linux #permissions work.

You should never set 777 (rwxrwxrwx) permissions #files and #directories permissions. 777 means that anyone can do anything with those files.

To Give Root Privileges to a User in Linux:

1. Adding to Root Group using usermod. Let see how we can grant normal user root access by adding to root group.

2. Adding to #Root Group using Useradd Command.

3. Editing /etc/passwd file.

4. Setting as Sudo User.

Read More


Add User To Group in Linux

This article will guide you on how to add a #user to a #group in #Linux. The group permissions apply only to the group that has been assigned to the file or directory, they will not effect the actions of other users. The others permissions apply to all other users on the system, this is the permission group that you want to watch the most.

Groups can be thought of as levels of #privilege. A person who is part of a group can view or modify files belonging to that group, depending on the permissions of that file. User belonging to a group has privileges of that group, for example - sudo groups lets you run software as super user.

To view all groups present on the system simply open the /etc/group file. Each line in this file represents information for one group. Another option is to use the getent command which displays entries from #databases configured in /etc/nsswitch.


To Create a New Sudo User:

1. Log in to your server as the root user. #ssh root@server_ip_address.

2. Use the adduser command to add a new user to your system. Be sure to replace username with the user that you want to create.

3. Use the usermod command to add the user to the wheel group.

4. Test sudo access on new user account.


To List Users in Linux:

i. Get a List of All Users using the /etc/passwd File.

ii. Get a List of all Users using the getent Command.

iii. Check whether a user exists in the Linux system.

iv. System and Normal Users.

Read More


Vim Show Line Numbers in Linux

This article will guide you on how to show line numbers in #Vim. You can ask #nano to temporarily turn on line numbers by pressing Alt-C (meaning “Hold down the Alt key and the C key simultaneously”). This will show line and column numbers near the bottom of nano's window.

To Turn on absolute line numbering by default in vim:

1. Open vim configuration file ~/.vimrc.

2. Append set number.

3. Press the Esc key.

4. To save the config file, type :w and hit Enter key.

5. You can temporarily disable the absolute line numbers within vim session, type:/> :set nonumber.


Use the “:set number” command if you want to enable absolute line numbers; or “:set relativenumber” for relative Vi numbers.

If you want to turn off the line numbering, remember the command “set nonumber.”

When you have both absolute and, hybrid numbers enabled, you’ll have access to the hybrid mode!

Read More


Guide to install Red Hat Enterprise Linux 7 3

This article will guide you on the step by step process to install Red Hat Enterprise Linux 7.3. This involves completing the “Installation Summary” window along with the installation of #VMware #Workstation and creation of a virtual machine.

Red Hat® Enterprise Linux® is the world's leading enterprise #Linux platform. * It's an open source operating system (#OS). It's the foundation from which you can scale existing apps—and roll out emerging technologies—across bare-metal, virtual, container, and all types of cloud environments.

Read More


Update Ubuntu from 16 04 to 18 04 via command line

This article will guide you on steps to #upgrade #Ubuntu #version.

To update Ubuntu using #terminal:

1. Open the terminal application.

2. For remote server use the ssh command to login (e.g. ssh user@server-name )

3. Fetch update software list by running #sudo apt-get update command.

4. Update Ubuntu #software by running sudo apt-get upgrade command.

5. Reboot the Ubuntu box if required by running sudo reboot.

Read More


YUM History command Ways to use it

This article will guide you on #YUM history #command in #Linux which provides a detailed history of YUM #transactions in order to find out information about installed packages and those that where removed/erased from a #system. 

The yum history command allows users to review information about a timeline of Yum transactions, the dates and times they occurred, the number of packages affected, whether transactions succeeded or were aborted, and if the RPM #database was changed between transactions.

Read More