<｜begin▁of▁sentence｜>### Instruction:
Given a linear graph with the edge set [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6)], compute the closeness centrality for each node using NetworkX.
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()
G.add_edges_from([(1, 2), (2, 3), (3, 4), (4, 5), (5, 6)])

# Compute closeness centrality
centrality = nx.closeness_centrality(G)

print("Node closeness centralities:\n", centrality)
<|EOT|>
