diff --git a/cmd/ipfs/init.go b/cmd/ipfs/init.go
index 66bdaf671a7bc5101931c00a81fecae116200b12..daab7f36fb71aeabb8a418460dcbce8ebccecb79 100644
--- a/cmd/ipfs/init.go
+++ b/cmd/ipfs/init.go
@@ -35,6 +35,17 @@ var initCmd = &cmds.Command{
 		// name of the file?
 		// TODO cmds.StringOption("event-logs", "l", "Location for machine-readable event logs"),
 	},
+	PreRun: func(req cmds.Request) error {
+		daemonLocked := fsrepo.LockedByOtherProcess(req.Context().ConfigRoot)
+
+		log.Info("checking if daemon is running...")
+		if daemonLocked {
+			e := "ipfs daemon is running. please stop it to run this command"
+			return cmds.ClientError(e)
+		}
+
+		return nil
+	},
 	Run: func(req cmds.Request, res cmds.Response) {
 
 		force, _, err := req.Option("f").Bool() // if !found, it's okay force == false