Detect Magic

Level & School
1st-level divination
Casting Time
Action or Ritual
Range
Self
Components
V, S
Duration
Concentration, up to 10 minutes
Classes
Bard, Cleric, Druid, Paladin, Ranger, Sorcerer, Warlock, Wizard

For the duration, you sense the presence of magical effects within 30 feet of yourself. If you sense such effects, you can take the Magic action to see a faint aura around any visible creature or object in the area that bears the magic, and if an effect was created by a spell, you learn the spell's school of magic.

The spell is blocked by 1 foot of stone, dirt, or wood; 1 inch of metal; or a thin sheet of lead.

Level & School
1st-level divination
Casting Time
Action
Range
Self
Components
V, S
Duration
Concentration, 10 minutes
Classes
Bard, Cleric, Druid, Paladin, Ranger, Sorcerer, Wizard

For the duration, you sense the presence of magic within 30 feet of you. If you sense magic in this way, you can use your action to see a faint aura around any visible creature or object in the area that bears magic, and you learn its school of magic, if any.

The spell can penetrate most barriers, but it is blocked by 1 foot of stone, 1 inch of common metal, a thin sheet of lead, or 3 feet of wood or dirt.

Detect Magic 5.5e 2024 vs. 5e 2014 edition differences

The 2024 version allows casting as a ritual, has a duration "up to 10 minutes," and specifies sensing "magical effects" rather than just magic presence. It introduces the "Magic" action to see a faint aura and clarifies effects created by spells. It also updates the barrier descriptions, including "dirt" and "metal" separately.