18

Aug/14

Share .bashrc

Suggested by Dave Bradford, it turns out you can share .bashrc files between computers and use symbolic link. Rename the file: mv ~/.bashrc ~/bashrc.bak Dropbox example: ln -s ~/Dropbox/.bashrc ~/.bashrc where the .bashrc is stored in the root Dropbox folder. … Continue reading

18

Nov/13

useradd: user already exists

Adding a user to an existing group may give an error: useradd: user ‘name’ already exists where name is the username. An example of this command should look similar to sudo useradd -G sambashare danny where sambashare is the group … Continue reading

18

Oct/11

Bash Reverse Search

A cool little tip when using Bash shell is the reverse search in the shell history. If your looking for a previous command hit the key combo [ctrl + r] and the prompt changes to (reverse-i-search) Type in the command … Continue reading

11

Oct/10

Bash Sleep vs. Wait

Both commands sound like they do the same thing but they are used in very different ways Sleep Stops script execution for a specified amount of time in seconds e.g sleep 30 will stop the script for 30 seconds before … Continue reading

02

Nov/09

Check GUI Program Is Running In Linux

Overview I have create a bash script to: Check if the program’s process is running If so just quit the script If not start up the program Using this script and crontab it allows the script to be ran every … Continue reading

01

May/09

Setting Default Linux Shell

My new user I created did not have any shell when I logged in. To set up a shell you need to know where the shell resides with this command: $ which bash where bash is the shell name. Replace … Continue reading