Seems like the geth.ipc file is not present in the path mentioned in your command.
If you have initialized the genesis block correctly then you should have the file in ./data directory. Anyways you can find it like this:
locate geth.ipc
It will show the location and then use that location
geth attach ipc:/<path to file>/geth.ipc console