Useful Linux commands

How to

1)  untar files:

tar xvzf filename.tar.gz

see more

2) create desktop shortcut:

gnome-desktop-item-edit --create-new ~/Desktop

3) switch g++ compilers (assuming you have more than one)

sudo update-alternatives --config gcc

see more

4) shutdown from terminal

shutdown -h now

5) find the ubuntu version

lsb_release -a

see more

6) Switching workspaces

While most Ubuntu users may know that ctrl+arrows is a quick way to navigate through the different workspaces, fewer may know that ctrl+shift+arrows is also transferring the currently active window to the new workspace.

7) Move files recursively

Lets suppose we want to move all files with *.bin suffix from the current directory to a different one (e.g. ../Results/). The following command does the trick

find $PWD -name '*.bin' -exec mv {} ../Results/ \;

8) Setting up Swap space

This link has all one needs to configure a swap space

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.