How to reboot or shutdown Ubuntu Linux via the command line

REBOOT Open a Terminal Window Type in the reboot command: sudo reboot PC should now reboot SHUTDOWN Open a Terminal Window Type in the following command to shutdown: sudo halt or sudo shutdown now PC should now switch off

April 7, 2018 · 1 min · 39 words · icarnaghan

How to remove a user from a group in Linux

Use the gpasswd command. The gpasswd command is used to administer /etc/group, and /etc/gshadow. Use to following command: sudo gpasswd -d user group Replace user with the user you wish to remove and group with the group. The _-d_option is to remove the user from the named group.

April 7, 2018 · 1 min · 48 words · icarnaghan

How to remove the DEFAULT value of a table column in PostgreSQL

Execute the following command ALTER TABLE your_table ALTER COLUMN your_column DROP DEFAULT; Replace your_table with the table and your_column with the column name where you wish to remove the default value The above command is the same as setting the DEFAULT to NULL

April 7, 2018 · 1 min · 43 words · icarnaghan

How to rename a table column in PostgreSQL

ALTER TABLE tablename RENAME COLUMN oldColumnName TO newColumnName;

April 7, 2018 · 1 min · 8 words · icarnaghan

How to rename files and folders using the command line in Linux

We accomplish this by using the “mv” (move command) Example: File Example: {codecitation class=“brush: bash;"}mv old_file new_file{/codecitation} Directory Example: {codecitation class=“brush: bash;"}mv old_directory new_directory{/codecitation} NOTE: mv can move several files into a destination folder, or a single file. mv renaming will contain the original attributes of the file or directory and also the creation date of the original file or folder

April 7, 2018 · 1 min · 61 words · icarnaghan

How to reset a forgotten Ubuntu password

Boot up your System When the Grub screen appears choose “Ubuntu x.xx, kernal x.x.x-xx-generic (recovery mode)”. The x’s are in the place of the version numbers On the next screen select “Drop to root shell prompt” Once in the root shell prompt use the passwd command to reset your password password USERNAME Replace USERNAME with the username who’s password you need to reset Next enter the following commands to force changed blocks to disk and reboot the System ...

April 7, 2018 · 1 min · 127 words · icarnaghan

How to resize a Batch of Images in Linux all at once

NOTE: Tried and tested in Ubuntu 11.04 Natty Narwhal To resize a batch of images we need to use a command line tool mogrify this tool forms part of the ImageMagick Libraries To use the mogrify command line tool we will need to install ImageMagick sudo apt-get install imagemagick After the install locate the folder via the command line where the images are that need to be resized cd /home/name/myPhotosResized Type in the following command to resize the images in the myPhotosResized folder to 1280px in width and maintaining the original aspect ratio ...

April 7, 2018 · 1 min · 118 words · icarnaghan

How to restart GDM in UBUNTU

GDM = GNOME Display Manager You may need to restart GDM if GDM halts or does not want to function anymore. If a similar problem like this occurs it usually means that only GDM does not function. If you quickly want to restart GDM press the following key combinations together: Ctrl+Alt+Backspace To restart GDM via the Terminal session type in the following command: sudo /etc/init.d/gdm restart

April 7, 2018 · 1 min · 66 words · icarnaghan

How to restart the service spamd in CPanel

Spamd is a service for Apache SpamAssassin and to restart the Spamd service on a CPanel server you need to execute the following command from the command line interface Restart Spamd /scripts/restartsrv_spamd To check the status of Spamd execute the following command /scripts/restartsrv_spamd --status

April 7, 2018 · 1 min · 44 words · icarnaghan

How to restore panels in Ubuntu to their default settings

How to restore panels in Ubuntu to their default settings after maybe deleting the Panels or accidentally removed an icon or something? You could always add the Panels/Icons one by one, but that’s time consuming. The quickest answer is below. STEP 1 Start a Terminal session. To do this press ALT+F2 together. The Run Applicationwindow should appear.Type in “gnome-terminal” click on Show list of known applications and select Terminal and click on run. ...

April 7, 2018 · 1 min · 148 words · icarnaghan