Category : Linux

Once you have added a new disk to your system, make sure it can be seen using the lsblk command. You should see something similar to the following. You can see a new disk identified as sdb. [root@UTLXDEV5866 ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 100G 0 disk├─sda1 8:1 0 1G 0 ..

Read more

When a new drive is added in Linux, it will not automatically appear and be usable. It will need to be partitioned and formatted for proper use first. You do need to know what type of drive you have added to the machine, whether it is a SCSI, SATA or IDE drive. Each type will ..

Read more

You may need to run a secure web server at some time which will require an SSL certificate. Even if you choose to have a commercial certificate, you will need to generate a CSR file which is part of this process. In order to create a SSL certificate under Linux you need to issue the ..

Read more

Crontab is a great utility to automate scripts and processes on your Linux/Unix/Mac machine. Regular users and root each have access to this utility. To check the cron jobs a particular user already has you can run the following from the command line. crontab -l This will list all current running cron jobs. Example: [root@web ..

Read more

By default color coding is disabled for the ”’ls”’ command under Ubuntu. If you wish to enable it simply add the following to your ”’.bashrc”’ file alias ls=’ls –color=auto’ Note: This is different than enabling color coding under Mac OSX as documented. If you wish for color coding when using the ”’ls”’ command under Mac ..

Read more

First limit permissions on the ftp home directory to allow read and download capabilities # chmod 540 ftp_home/ Then to any file added I make read only # chmod 444 ~ftp_home/file This should allow the user(s) to view files available to download without them being able to remove or alter the file nor able to ..

Read more

Sometimes using an interactive SSH login to a remote system is not desired. For instance if you have created rsync scripts to automate backups of one system to another. A good way to automate this while maintaining a level of security is with the use of RSA encrypted keys shared between the machines you wish ..

Read more

Note: It is recommended to uninstall and then reinstall mysql and attendant packages on the slave if it has been used a a slave for replication previously. There may be a permissions or other issue which often brings up problems when bringing the slave back up upon reconfiguration if packages are not reinstalled. There may ..

Read more

Here are commands you need to type for each step (login as the root user): Step 1.  Stop MariaDB service. # systemctl stop mariadb Step 2.  Start MariaDB server w/o password. # mariadb_safe –skip-grant-tables & [1] 5988 Starting mariadb daemon with databases from /var/lib/mysql mariadb_safe[6025]: started Step 3.  Connect to mariadb server using mysql client: # mysql -u root ..

Read more

If you need to find the amount of disk space being consumed in Linux, you can show it recursively through your directories as follows. $ sudo du -ahx /var | sort -rh | head -10 357M /var 250M /var/lib 185M /var/lib/rpm 177M /var/lib/rpm/Packages 79M /var/cache/dnf 79M /var/cache 34M /var/lib/sss 29M /var/log 27M /var/lib/sss/mc 27M /var/lib/selinux/targeted/active ..

Read more