LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

neo4j

native graph database platform for connected data

TLDR

Start Neo4j server
$ neo4j start
copy
Stop server
$ neo4j stop
copy
Check status
$ neo4j status
copy
Run as console (foreground)
$ neo4j console
copy
Open Cypher shell
$ cypher-shell
copy
Set initial password
$ neo4j-admin dbms set-initial-password [password]
copy

SYNOPSIS

neo4j command [options]

DESCRIPTION

Neo4j is a native graph database platform for connected data. It uses the Cypher query language and stores data as nodes and relationships.Neo4j excels at queries involving complex relationships that would require expensive joins in relational databases.

PARAMETERS

start

Start server in background.
stop
Stop server.
restart
Restart server.
status
Check server status.
console
Run in foreground.
version
Print Neo4j version information and exit.
help
Print usage information for the neo4j launcher.

CONFIGURATION

$ /etc/neo4j/neo4j.conf
~/.neo4j/neo4j.conf
copy

CYPHER EXAMPLES

$ // Create node
CREATE (n:Person {name: 'Alice'})

// Create relationship
MATCH (a:Person), (b:Person)
WHERE a.name = 'Alice' AND b.name = 'Bob'
CREATE (a)-[:KNOWS]->(b)

// Query
MATCH (n:Person)-[:KNOWS]->(m)
RETURN n.name, m.name
copy

CAVEATS

Memory-intensive for large graphs. Community edition is single-node only. Requires Java 21 or later (starting with the 2025 calendar-versioned releases). Default endpoints: Neo4j Browser on port 7474, Bolt protocol on port 7687. Administrative actions (initial password, dump/load, database create) are handled by neo4j-admin, not neo4j.

HISTORY

Neo4j was developed by Neo4j, Inc. (originally Neo Technology), with version 1.0 released in 2010. It pioneered the property graph model.

SEE ALSO

Copied to clipboard
Kai