According to The Cephalopod Page, squids do not survive well in aquariums and should not be kept as pets. However, octopuses do make a suitable choice for owners interested in keeping a cephalopod as a pet. Octopuses need proper food and an ample, secure tank with plenty of places to hide and clean water.
Octopuses are carnivorous and eat mostly fish, crustaceans and mollusks in the ocean. In captivity, they generally eat either live or thawed-out food, but they typically prefer live food. A 15- to 30-gallon tank should suffice for most commercially available octopuses, though some can grow larger than others, and it never hurts to have a bigger tank. Octopuses typically need a tank all to themselves, because they view most other aquatic life as food. Echinoderms like sea stars and sea urchins are safe to keep alongside an octopus. The tank should also be secure to prevent the octopus from escaping. Octopuses are extremely intelligent and can typically find their way out of any aquarium that is not welded shut or otherwise secured. Octopuses are reserved creatures and need plenty of room in a tank to hide. Objects like shells, PVC pipes, glass jars, limestone or other aquarium-safe rocks all provide great environments for octopuses to hide. An octopus also needs clean water provided by a standard tank-filtration system.